function views_plugin_display_block::options_summary in Views (for Drupal 7) 6.2
Same name and namespace in other branches
- 6.3 plugins/views_plugin_display_block.inc \views_plugin_display_block::options_summary()
- 7.3 plugins/views_plugin_display_block.inc \views_plugin_display_block::options_summary()
Provide the summary for page options in the views UI.
This output is returned as an array.
Overrides views_plugin_display::options_summary
File
- plugins/
views_plugin_display_block.inc, line 62 - 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'),
);
$block_description = strip_tags($this
->get_option('block_description'));
if (empty($block_description)) {
$block_description = t('None');
}
if (strlen($block_description) > 16) {
$block_description = drupal_substr($block_description, 0, 16) . '...';
}
$options['block_description'] = array(
'category' => 'block',
'title' => t('Admin'),
'value' => $block_description,
);
$cache_type = $this
->get_option('block_caching');
if (empty($cache_type)) {
$cache_type = BLOCK_NO_CACHE;
}
$types = $this
->block_caching_modes();
$options['block_caching'] = array(
'category' => 'block',
'title' => t('Caching'),
'value' => $types[$this
->get_cache_type()],
);
}