function views_plugin_display_page::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
1 call to views_plugin_display_page::options_summary()
- views_plugin_display_feed::options_summary in plugins/
views_plugin_display_feed.inc - Provide the summary for page options in the views UI.
1 method overrides views_plugin_display_page::options_summary()
- views_plugin_display_feed::options_summary in plugins/
views_plugin_display_feed.inc - Provide the summary for page options in the views UI.
File
-
plugins/
views_plugin_display_page.inc, line 273
Class
- views_plugin_display_page
- The plugin that handles a full page.
Code
public 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;
case 'local action':
$menu_str = t('Local action: @title', array(
'@title' => $menu['title'],
));
}
$options['menu'] = array(
'category' => 'page',
'title' => t('Menu'),
'value' => views_ui_truncate($menu_str, 24),
);
// 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');
}
}