1 views_plugin_display_page.inc | views_plugin_display_page::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_page.inc, line 244 - Contains the page display plugin.
Class
- views_plugin_display_page
- The plugin that handles a full page.
Code
function options_summary(&$categories, &$options) {
// It is very important to call the parent function here:
parent::options_summary($categories, $options);
$categories['page'] = array(
'title' => t('Page settings'),
'column' => 'second',
'build' => array(
'#weight' => -10,
),
);
$path = strip_tags($this->get_option('path'));
if (empty($path)) {
$path = t('No path is set');
}
else {
$path = '/' . $path;
}
$options['path'] = array(
'category' => 'page',
'title' => t('Path'),
'value' => $path,
);
$menu = $this->get_option('menu');
if (!is_array($menu)) {
$menu = array('type' => 'none');
}
switch ($menu['type']) {
case 'none':
default:
$menu_str = t('No menu');
break;
case 'normal':
$menu_str = t('Normal: @title', array('@title' => $menu['title']));
break;
case 'tab':
case 'default tab':
$menu_str = t('Tab: @title', array('@title' => $menu['title']));
break;
}
$options['menu'] = array(
'category' => 'page',
'title' => t('Menu'),
'value' => $menu_str,
);
// This adds a 'Settings' link to the style_options setting if the style has options.
if ($menu['type'] == 'default tab') {
$options['menu']['setting'] = t('Parent menu item');
$options['menu']['links']['tab_options'] = t('Change settings for the parent menu');
}
}