1 views_plugin_display_block.inc | views_plugin_display_block::options_summary(&$categories, &$options) |
Provide the summary for page options in the views UI.
This output is returned as an array.
Overrides views_plugin_display::options_summary
File
- core/
modules/ views/ plugins/ views_plugin_display_block.inc, line 133 - Contains the block display plugin.
Class
- views_plugin_display_block
- The plugin that handles a block.
Code
function options_summary(&$categories, &$options) {
// It is very important to call the parent function here:
parent::options_summary($categories, $options);
$categories['block'] = array(
'title' => t('Block settings'),
'column' => 'second',
'build' => array(
'#weight' => -10,
),
);
$block_description = strip_tags($this->get_option('block_description'));
if (empty($block_description)) {
if ($this->display->display_title == $this->definition['title']) {
$block_description = t('View: @view', array('@view' => t($this->view->get_human_name())));
}
else {
$block_description = t('View: @view (@display)', array('@view' => t($this->view->get_human_name()), '@display' => t($this->display->display_title)));
}
}
$options['block_description'] = array(
'category' => 'block',
'title' => t('Block admin label'),
'value' => views_ui_truncate($block_description, 24),
);
$options['link_to_view'] = array(
'category' => 'block',
'title' => t('Link title to page display'),
'value' => $this->get_option('link_to_view') ? t('Yes') : t('No'),
);
$options['inherit_path'] = array(
'category' => 'block',
'title' => t('Inherits path'),
'value' => $this->get_option('inherit_path') ? t('Yes') : t('No'),
);
$options['argument_input'] = array(
'category' => 'block',
'title' => t('Contextual filter input'),
'value' => t('Edit'),
);
$allow = $this->get_option('allow');
$filtered_allow = array_filter($allow);
$options['allow'] = array(
'category' => 'block',
'title' => t('Allow settings override'),
'value' => empty($filtered_allow) ? t('None') : ($allow === $filtered_allow ? t('All') : t('Some')),
);
$types = $this->block_caching_modes();
$options['block_caching'] = array(
'category' => 'other',
'title' => t('Block caching'),
'value' => $types[$this->get_cache_type()],
);
}