Commit 3905c51a authored by dawehner's avatar dawehner Committed by tim.plunkett

Issue #1762662 by dawehner, tim.plunkett: Cleanup methods on DisplayPluginBase.

parent ebaa0f1c
This diff is collapsed.
......@@ -67,7 +67,7 @@ function views_ajax() {
// Override the display's pager_element with the one actually used.
if (isset($pager_element)) {
$commands[] = views_ajax_command_scroll_top('.view-dom-id-' . $dom_id);
$view->display[$display_id]->handler->set_option('pager_element', $pager_element);
$view->display[$display_id]->handler->setOption('pager_element', $pager_element);
}
// Reuse the same DOM id so it matches that in Drupal.settings.
$view->dom_id = $dom_id;
......
......@@ -27,7 +27,7 @@ function views_ui_views_analyze($view) {
if (empty($display->handler)) {
continue;
}
if ($display->handler->has_path() && $path = $display->handler->get_option('path')) {
if ($display->handler->hasPath() && $path = $display->handler->getOption('path')) {
$normal_path = drupal_get_normal_path($path);
if ($path != $normal_path) {
$ret[] = Analyzer::formatMessage(t('You have configured display %display with a path which is an path alias as well. This might lead to unwanted effects so better use an internal path.', array('%display' => $display->display_title)), 'warning');
......
......@@ -99,7 +99,7 @@ function init(&$view, &$options) {
if (isset($types[$this->plugin_type]['plural'])) {
$plural = $types[$this->plugin_type]['plural'];
}
if ($this->view->display_handler->is_defaulted($plural)) {
if ($this->view->display_handler->isDefaulted($plural)) {
$display_id = 'default';
}
......@@ -178,7 +178,7 @@ function get_field($field = NULL) {
}
// If grouping, check to see if the aggregation method needs to modify the field.
if ($this->view->display_handler->use_group_by()) {
if ($this->view->display_handler->useGroupBy()) {
$this->view->initQuery();
if ($this->query) {
$info = $this->query->get_aggregation_info();
......
......@@ -35,7 +35,7 @@ function init(&$view, &$display) {
$this->display = &$display;
if (is_object($display->handler)) {
$options = $display->handler->get_option('access');
$options = $display->handler->getOption('access');
// Overlay incoming options on top of defaults
$this->unpack_options($this->options, $options);
}
......
......@@ -48,12 +48,12 @@ function options_form(&$form, &$form_state) {
// Get a list of the available fields and arguments for token replacement.
$options = array();
foreach ($this->view->display_handler->get_handlers('field') as $field => $handler) {
foreach ($this->view->display_handler->getHandlers('field') as $field => $handler) {
$options[t('Fields')]["[$field]"] = $handler->ui_name();
}
$count = 0; // This lets us prepare the key as we want it printed.
foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) {
foreach ($this->view->display_handler->getHandlers('argument') as $arg => $handler) {
$options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->ui_name()));
$options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->ui_name()));
}
......
......@@ -160,7 +160,7 @@ function option_definition() {
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$argument_text = $this->view->display_handler->get_argument_text();
$argument_text = $this->view->display_handler->getArgumentText();
$form['#pre_render'][] = 'views_ui_pre_render_move_argument_options';
......@@ -479,7 +479,7 @@ function default_actions($which = NULL) {
),
);
if ($this->view->display_handler->has_path()) {
if ($this->view->display_handler->hasPath()) {
$defaults['not found']['title'] = t('Show "Page not found"');
}
......@@ -851,7 +851,7 @@ function summary_name_field() {
*/
function summary_basics($count_field = TRUE) {
// Add the number of nodes counter
$distinct = ($this->view->display_handler->get_option('distinct') && empty($this->query->no_distinct));
$distinct = ($this->view->display_handler->getOption('distinct') && empty($this->query->no_distinct));
$count_alias = $this->query->add_field($this->query->base_table, $this->query->base_field, 'num_records', array('count' => TRUE, 'distinct' => $distinct));
$this->query->add_groupby($this->name_alias);
......
......@@ -64,7 +64,7 @@ function init(&$view, &$display) {
$this->display = &$display;
if (is_object($display->handler)) {
$options = $display->handler->get_option('cache');
$options = $display->handler->getOption('cache');
// Overlay incoming options on top of defaults
$this->unpack_options($this->options, $options);
}
......@@ -274,7 +274,7 @@ function get_results_key() {
$build_info = $this->view->build_info;
$query_plugin = $this->view->display_handler->get_plugin('query');
$query_plugin = $this->view->display_handler->getPlugin('query');
foreach (array('query', 'count_query') as $index) {
// If the default query back-end is used generate SQL query strings from
......
......@@ -49,11 +49,11 @@ function option_definition() {
return $options;
}
function execute() {
public function execute() {
return $this->view->render($this->display->id);
}
function attachment_positions($position = NULL) {
public function attachmentPositions($position = NULL) {
$positions = array(
'before' => t('Before'),
'after' => t('After'),
......@@ -72,9 +72,9 @@ function attachment_positions($position = NULL) {
*
* This output is returned as an array.
*/
function options_summary(&$categories, &$options) {
public function optionsSummary(&$categories, &$options) {
// It is very important to call the parent function here:
parent::options_summary($categories, $options);
parent::optionsSummary($categories, $options);
$categories['attachment'] = array(
'title' => t('Attachment settings'),
......@@ -84,7 +84,7 @@ function options_summary(&$categories, &$options) {
),
);
$displays = array_filter($this->get_option('displays'));
$displays = array_filter($this->getOption('displays'));
if (count($displays) > 1) {
$attach_to = t('Multiple displays');
}
......@@ -108,31 +108,31 @@ function options_summary(&$categories, &$options) {
$options['attachment_position'] = array(
'category' => 'attachment',
'title' => t('Attachment position'),
'value' => $this->attachment_positions($this->get_option('attachment_position')),
'value' => $this->attachmentPositions($this->getOption('attachment_position')),
);
$options['inherit_arguments'] = array(
'category' => 'attachment',
'title' => t('Inherit contextual filters'),
'value' => $this->get_option('inherit_arguments') ? t('Yes') : t('No'),
'value' => $this->getOption('inherit_arguments') ? t('Yes') : t('No'),
);
$options['inherit_exposed_filters'] = array(
'category' => 'attachment',
'title' => t('Inherit exposed filters'),
'value' => $this->get_option('inherit_exposed_filters') ? t('Yes') : t('No'),
'value' => $this->getOption('inherit_exposed_filters') ? t('Yes') : t('No'),
);
$options['inherit_pager'] = array(
'category' => 'pager',
'title' => t('Inherit pager'),
'value' => $this->get_option('inherit_pager') ? t('Yes') : t('No'),
'value' => $this->getOption('inherit_pager') ? t('Yes') : t('No'),
);
$options['render_pager'] = array(
'category' => 'pager',
'title' => t('Render pager'),
'value' => $this->get_option('render_pager') ? t('Yes') : t('No'),
'value' => $this->getOption('render_pager') ? t('Yes') : t('No'),
);
}
......@@ -140,7 +140,7 @@ function options_summary(&$categories, &$options) {
/**
* Provide the default form for setting options.
*/
function options_form(&$form, &$form_state) {
public function options_form(&$form, &$form_state) {
// It is very important to call the parent function here:
parent::options_form($form, $form_state);
......@@ -151,7 +151,7 @@ function options_form(&$form, &$form_state) {
'#type' => 'checkbox',
'#title' => t('Inherit'),
'#description' => t('Should this display inherit its contextual filter values from the parent display to which it is attached?'),
'#default_value' => $this->get_option('inherit_arguments'),
'#default_value' => $this->getOption('inherit_arguments'),
);
break;
case 'inherit_exposed_filters':
......@@ -160,7 +160,7 @@ function options_form(&$form, &$form_state) {
'#type' => 'checkbox',
'#title' => t('Inherit'),
'#description' => t('Should this display inherit its exposed filter values from the parent display to which it is attached?'),
'#default_value' => $this->get_option('inherit_exposed_filters'),
'#default_value' => $this->getOption('inherit_exposed_filters'),
);
break;
case 'inherit_pager':
......@@ -169,7 +169,7 @@ function options_form(&$form, &$form_state) {
'#type' => 'checkbox',
'#title' => t('Inherit'),
'#description' => t('Should this display inherit its paging values from the parent display to which it is attached?'),
'#default_value' => $this->get_option('inherit_pager'),
'#default_value' => $this->getOption('inherit_pager'),
);
break;
case 'render_pager':
......@@ -178,7 +178,7 @@ function options_form(&$form, &$form_state) {
'#type' => 'checkbox',
'#title' => t('Render'),
'#description' => t('Should this display render the pager values? This is only meaningful if inheriting a pager.'),
'#default_value' => $this->get_option('render_pager'),
'#default_value' => $this->getOption('render_pager'),
);
break;
case 'attachment_position':
......@@ -186,8 +186,8 @@ function options_form(&$form, &$form_state) {
$form['attachment_position'] = array(
'#type' => 'radios',
'#description' => t('Attach before or after the parent display?'),
'#options' => $this->attachment_positions(),
'#default_value' => $this->get_option('attachment_position'),
'#options' => $this->attachmentPositions(),
'#default_value' => $this->getOption('attachment_position'),
);
break;
case 'displays':
......@@ -202,7 +202,7 @@ function options_form(&$form, &$form_state) {
'#type' => 'checkboxes',
'#description' => t('Select which display or displays this should attach to.'),
'#options' => $displays,
'#default_value' => $this->get_option('displays'),
'#default_value' => $this->getOption('displays'),
);
break;
}
......@@ -212,7 +212,7 @@ function options_form(&$form, &$form_state) {
* Perform any necessary changes to the form values prior to storage.
* There is no need for this function to actually store the data.
*/
function options_submit(&$form, &$form_state) {
public function options_submit(&$form, &$form_state) {
// It is very important to call the parent function here:
parent::options_submit($form, $form_state);
switch ($form_state['section']) {
......@@ -222,7 +222,7 @@ function options_submit(&$form, &$form_state) {
case 'inherit_exposed_filters':
case 'attachment_position':
case 'displays':
$this->set_option($form_state['section'], $form_state['values'][$form_state['section']]);
$this->setOption($form_state['section'], $form_state['values'][$form_state['section']]);
break;
}
}
......@@ -230,8 +230,8 @@ function options_submit(&$form, &$form_state) {
/**
* Attach to another view.
*/
function attach_to($display_id) {
$displays = $this->get_option('displays');
public function attachTo($display_id) {
$displays = $this->getOption('displays');
if (empty($displays[$display_id])) {
return;
......@@ -246,17 +246,17 @@ function attach_to($display_id) {
$view = $this->view->cloneView();
$view->original_args = $view->args;
$args = $this->get_option('inherit_arguments') ? $this->view->args : array();
$args = $this->getOption('inherit_arguments') ? $this->view->args : array();
$view->setArguments($args);
$view->setDisplay($this->display->id);
if ($this->get_option('inherit_pager')) {
if ($this->getOption('inherit_pager')) {
$view->display_handler->usesPager = $this->view->display[$display_id]->handler->usesPager();
$view->display_handler->set_option('pager', $this->view->display[$display_id]->handler->get_option('pager'));
$view->display_handler->setOption('pager', $this->view->display[$display_id]->handler->getOption('pager'));
}
$attachment = $view->executeDisplay($this->display->id, $args);
switch ($this->get_option('attachment_position')) {
switch ($this->getOption('attachment_position')) {
case 'before':
$this->view->attachment_before .= $attachment;
break;
......@@ -277,8 +277,8 @@ function attach_to($display_id) {
* they are set to inherit the exposed filter settings
* of their parent display.
*/
function uses_exposed() {
if (!empty($this->options['inherit_exposed_filters']) && parent::uses_exposed()) {
public function usesExposed() {
if (!empty($this->options['inherit_exposed_filters']) && parent::usesExposed()) {
return TRUE;
}
return FALSE;
......@@ -289,12 +289,12 @@ function uses_exposed() {
* settings from its parent display, then don't render and
* display a second set of exposed filter widgets.
*/
function displays_exposed() {
public function displaysExposed() {
return $this->options['inherit_exposed_filters'] ? FALSE : TRUE;
}
function render_pager() {
return $this->usesPager() && $this->get_option('render_pager');
public function renderPager() {
return $this->usesPager() && $this->getOption('render_pager');
}
}
......@@ -48,9 +48,9 @@ function option_definition() {
* but extended block handlers might be able to do interesting
* stuff with it.
*/
function execute_hook_block_list($delta = 0, $edit = array()) {
public function executeHookBlockList($delta = 0, $edit = array()) {
$delta = $this->view->name . '-' . $this->display->id;
$desc = $this->get_option('block_description');
$desc = $this->getOption('block_description');
if (empty($desc)) {
if ($this->display->display_title == $this->definition['title']) {
......@@ -63,7 +63,7 @@ function execute_hook_block_list($delta = 0, $edit = array()) {
return array(
$delta => array(
'info' => $desc,
'cache' => $this->get_cache_type()
'cache' => $this->getCacheType()
),
);
}
......@@ -71,12 +71,12 @@ function execute_hook_block_list($delta = 0, $edit = array()) {
/**
* The display block handler returns the structure necessary for a block.
*/
function execute() {
public function execute() {
// Prior to this being called, the $view should already be set to this
// display, and arguments should be set on the view.
$info['content'] = $this->view->render();
$info['subject'] = filter_xss_admin($this->view->getTitle());
if (!empty($this->view->result) || $this->get_option('empty') || !empty($this->view->style_plugin->definition['even empty'])) {
if (!empty($this->view->result) || $this->getOption('empty') || !empty($this->view->style_plugin->definition['even empty'])) {
return $info;
}
}
......@@ -86,9 +86,9 @@ function execute() {
*
* This output is returned as an array.
*/
function options_summary(&$categories, &$options) {
public function optionsSummary(&$categories, &$options) {
// It is very important to call the parent function here:
parent::options_summary($categories, $options);
parent::optionsSummary($categories, $options);
$categories['block'] = array(
'title' => t('Block settings'),
......@@ -98,7 +98,7 @@ function options_summary(&$categories, &$options) {
),
);
$block_description = strip_tags($this->get_option('block_description'));
$block_description = strip_tags($this->getOption('block_description'));
if (empty($block_description)) {
$block_description = t('None');
}
......@@ -109,18 +109,18 @@ function options_summary(&$categories, &$options) {
'value' => views_ui_truncate($block_description, 24),
);
$types = $this->block_caching_modes();
$types = $this->blockCachingModes();
$options['block_caching'] = array(
'category' => 'other',
'title' => t('Block caching'),
'value' => $types[$this->get_cache_type()],
'value' => $types[$this->getCacheType()],
);
}
/**
* Provide a list of core's block caching modes.
*/
function block_caching_modes() {
protected function blockCachingModes() {
return array(
DRUPAL_NO_CACHE => t('Do not cache'),
DRUPAL_CACHE_GLOBAL => t('Cache once for everything (global)'),
......@@ -136,8 +136,8 @@ function block_caching_modes() {
* Provide a single method to figure caching type, keeping a sensible default
* for when it's unset.
*/
function get_cache_type() {
$cache_type = $this->get_option('block_caching');
protected function getCacheType() {
$cache_type = $this->getOption('block_caching');
if (empty($cache_type)) {
$cache_type = DRUPAL_NO_CACHE;
}
......@@ -147,7 +147,7 @@ function get_cache_type() {
/**
* Provide the default form for setting options.
*/
function options_form(&$form, &$form_state) {
public function options_form(&$form, &$form_state) {
// It is very important to call the parent function here:
parent::options_form($form, $form_state);
......@@ -157,7 +157,7 @@ function options_form(&$form, &$form_state) {
$form['block_description'] = array(
'#type' => 'textfield',
'#description' => t('This will appear as the name of this block in administer >> structure >> blocks.'),
'#default_value' => $this->get_option('block_description'),
'#default_value' => $this->getOption('block_description'),
);
break;
case 'block_caching':
......@@ -166,13 +166,13 @@ function options_form(&$form, &$form_state) {
$form['block_caching'] = array(
'#type' => 'radios',
'#description' => t("This sets the default status for Drupal's built-in block caching method; this requires that caching be turned on in block administration, and be careful because you have little control over when this cache is flushed."),
'#options' => $this->block_caching_modes(),
'#default_value' => $this->get_cache_type(),
'#options' => $this->blockCachingModes(),
'#default_value' => $this->getCacheType(),
);
break;
case 'exposed_form_options':
$this->view->initHandlers();
if (!$this->uses_exposed() && parent::uses_exposed()) {
if (!$this->usesExposed() && parent::usesExposed()) {
$form['exposed_form_options']['warning'] = array(
'#weight' => -10,
'#markup' => '<div class="messages warning">' . t('Exposed filters in block displays require "Use AJAX" to be set to work correctly.') . '</div>',
......@@ -185,19 +185,19 @@ function options_form(&$form, &$form_state) {
* Perform any necessary changes to the form values prior to storage.
* There is no need for this function to actually store the data.
*/
function options_submit(&$form, &$form_state) {
public function options_submit(&$form, &$form_state) {
// It is very important to call the parent function here:
parent::options_submit($form, $form_state);
switch ($form_state['section']) {
case 'display_id':
$this->update_block_bid($form_state['view']->name, $this->display->id, $this->display->new_id);
$this->updateBlockBid($form_state['view']->name, $this->display->id, $this->display->new_id);
break;
case 'block_description':
$this->set_option('block_description', $form_state['values']['block_description']);
$this->setOption('block_description', $form_state['values']['block_description']);
break;
case 'block_caching':
$this->set_option('block_caching', $form_state['values']['block_caching']);
$this->save_block_cache($form_state['view']->name . '-'. $form_state['display_id'], $form_state['values']['block_caching']);
$this->setOption('block_caching', $form_state['values']['block_caching']);
$this->saveBlockCache($form_state['view']->name . '-'. $form_state['display_id'], $form_state['values']['block_caching']);
break;
}
}
......@@ -205,9 +205,9 @@ function options_submit(&$form, &$form_state) {
/**
* Block views use exposed widgets only if AJAX is set.
*/
function uses_exposed() {
public function usesExposed() {
if ($this->isAJAXEnabled()) {
return parent::uses_exposed();
return parent::usesExposed();
}
return FALSE;
}
......@@ -215,7 +215,7 @@ function uses_exposed() {
/**
* Update the block delta when you change the machine readable name of the display.
*/
function update_block_bid($name, $old_delta, $delta) {
protected function updateBlockBid($name, $old_delta, $delta) {
$old_hashes = $hashes = variable_get('views_block_hashes', array());
$old_delta = $name . '-' . $old_delta;
......@@ -248,7 +248,7 @@ function update_block_bid($name, $old_delta, $delta) {
* Save the block cache setting in the blocks table if this block allready
* exists in the blocks table. Dirty fix untill http://drupal.org/node/235673 gets in.
*/
function save_block_cache($delta, $cache_setting) {
protected function saveBlockCache($delta, $cache_setting) {
if (strlen($delta) >= 32) {
$delta = md5($delta);
}
......
......@@ -36,7 +36,7 @@ class DefaultDisplay extends DisplayPluginBase {
* Determine if this display is the 'default' display which contains
* fallback settings
*/
function is_default_display() { return TRUE; }
public function isDefaultDisplay() { return TRUE; }
/**
* The default execute handler fully renders the view.
......@@ -72,7 +72,7 @@ function is_default_display() { return TRUE; }
* as setting page titles, breadcrumbs, and generating exposed filter
* data if necessary.
*/
function execute() {
public function execute() {
return $this->view->render($this->display->id);
}
......
......@@ -43,28 +43,28 @@ class Feed extends Page {
*/
protected $usesPager = FALSE;
function init(&$view, &$display, $options = NULL) {
public function init(&$view, &$display, $options = NULL) {
parent::init($view, $display, $options);
// Set the default row style. Ideally this would be part of the option
// definition, but in this case it's dependent on the view's base table,
// which we don't know until init().
$row_plugins = views_fetch_plugin_names('row', $this->get_style_type(), array($view->base_table));
$row_plugins = views_fetch_plugin_names('row', $this->getStyleType(), array($view->base_table));
$default_row_plugin = key($row_plugins);
if ($this->options['row_plugin'] == '') {
$this->options['row_plugin'] = $default_row_plugin;
}
}
function uses_breadcrumb() { return FALSE; }
function get_style_type() { return 'feed'; }
public function usesBreadcrumb() { return FALSE; }
protected function getStyleType() { return 'feed'; }
/**
* Feeds do not go through the normal page theming mechanism. Instead, they
* go through their own little theme function and then return NULL so that
* Drupal believes that the page has already rendered itself...which it has.
*/
function execute() {
public function execute() {
$output = $this->view->render();
if (empty($output)) {
throw new NotFoundHttpException();
......@@ -75,7 +75,7 @@ function execute() {
return $response;
}
function preview() {
public function preview() {
if (!empty($this->view->live_preview)) {
return '<pre>' . check_plain($this->view->render()) . '</pre>';
}
......@@ -86,16 +86,16 @@ function preview() {
* Instead of going through the standard views_view.tpl.php, delegate this
* to the style handler.
*/
function render() {
public function render() {
return $this->view->style_plugin->render($this->view->result);
}
function defaultable_sections($section = NULL) {
public function defaultableSections($section = NULL) {
if (in_array($section, array('style_options', 'style_plugin', 'row_options', 'row_plugin'))) {
return FALSE;
}
$sections = parent::defaultable_sections($section);
$sections = parent::defaultableSections($section);
// Tell views our sitename_title option belongs in the title section.
if ($section == 'title') {
......@@ -107,7 +107,7 @@ function defaultable_sections($section = NULL) {
return $sections;
}
function option_definition() {
public function option_definition() {
$options = parent::option_definition();
$options['displays'] = array('default' => array());
......@@ -125,9 +125,9 @@ function option_definition() {
return $options;
}
function options_summary(&$categories, &$options) {
public function optionsSummary(&$categories, &$options) {
// It is very important to call the parent function here:
parent::options_summary($categories, $options);
parent::optionsSummary($categories, $options);
// Since we're childing off the 'page' type, we'll still *call* our
// category 'page' but let's override it so it says feed settings.
......@@ -139,14 +139,14 @@ function options_summary(&$categories, &$options) {
),
);
if ($this->get_option('sitename_title')) {
if ($this->getOption('sitename_title')) {
$options['title']['value'] = t('Using the site name');
}
// I don't think we want to give feeds menus directly.
unset($options['menu']);
$displays = array_filter($this->get_option('displays'));
$displays = array_filter($this->getOption('displays'));
if (count($displays) > 1) {
$attach_to = t('Multiple displays');
}
......@@ -171,7 +171,7 @@ function options_summary(&$categories, &$options) {
/**
* Provide the default form for setting options.
*/
function options_form(&$form, &$form_state) {
public function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// It is very important to call the parent function here.
parent::options_form($form, $form_state);
......@@ -184,7 +184,7 @@ function options_form(&$form, &$form_state) {
$form['sitename_title'] = array(
'#type' => 'checkbox',
'#title' => t('Use the site name for the title'),
'#default_value' => $this->get_option('sitename_title'),
'#default_value' => $this->getOption('sitename_title'),
);
$form['title'] = $title;
$form['title']['#states'] = array(
......@@ -205,7 +205,7 @@ function options_form(&$form, &$form_state) {
'#type' => 'checkboxes',
'#description' => t('The feed icon will be available only to the selected displays.'),
'#options' => $displays,
'#default_value' => $this->get_option('displays'),
'#default_value' => $this->getOption('displays'),
);
break;
case 'path':
......@@ -217,15 +217,15 @@ function options_form(&$form, &$form_state) {
* Perform any necessary changes to the form values prior to storage.
* There is no need for this function to actually store the data.
*/
function options_submit(&$form, &$form_state) {
public function options_submit(&$form, &$form_state) {
// It is very important to call the parent function here:
parent::options_submit($form, $form_state);
switch ($form_state['section']) {
case 'title':
$this->set_option('sitename_title', $form_state['values']['sitename_title']);
$this->setOption('sitename_title', $form_state['values']['sitename_title']);
break;
case 'displays':
$this->set_option($form_state['section'], $form_state['values'][$form_state['section']]);
$this->setOption($form_state['section'], $form_state['values'][$form_state['section']]);
break;
}
}
......@@ -233,20 +233,20 @@ function options_submit(&$form, &$form_state) {
/**
* Attach to another view.
*/
function attach_to($display_id) {
$displays = $this->get_option('displays');
public function attachTo($display_id) {
$displays = $this->getOption('displays');
if (empty($displays[$display_id])) {
return;
}
// Defer to the feed style; it may put in meta information, and/or
// attach a feed icon.
$plugin = $this->get_plugin();
$plugin = $this->getPlugin('style');
if ($plugin) {
$clone = $this->view->cloneView();
$clone->setDisplay($this->display->id);
$clone->buildTitle();