function views_attach_plugin_display_node_content::options_summary in Views attach 6.2
Same name and namespace in other branches
- 6 views_attach_plugin_display_node_content.inc \views_attach_plugin_display_node_content::options_summary()
- 7.2 views_attach_plugin_display_node_content.inc \views_attach_plugin_display_node_content::options_summary()
Provide the summary for page options in the views UI.
This output is returned as an array.
File
- ./
views_attach_plugin_display_node_content.inc, line 24
Class
- views_attach_plugin_display_node_content
- The plugin that handles node-attached views.
Code
function options_summary(&$categories, &$options) {
// Call to parent function.
parent::options_summary($categories, $options);
$categories['node_content'] = array(
'title' => t('Node content settings'),
);
$types = $this
->get_option('types');
if (empty($types)) {
$types = array(
'story',
);
}
$options['types'] = array(
'category' => 'node_content',
'title' => t('Node types'),
'value' => implode(', ', $types),
);
$used_modes = $this
->get_option('modes');
// Get the human readable names.
$modes = views_attach_build_modes();
foreach ($used_modes as $mode) {
$display_modes[] = $modes[$mode];
}
$options['modes'] = array(
'category' => 'node_content',
'title' => t('Build modes'),
'value' => implode(', ', $display_modes),
);
$weight = $this
->get_option('weight');
if (empty($weight)) {
$weight = 10;
}
$argument_mode = $this
->get_option('argument_mode');
$options['arguments'] = array(
'category' => 'node_content',
'title' => t('Arguments'),
'value' => empty($argument_mode) ? t('None') : check_plain($argument_mode),
);
$options['show_title'] = array(
'category' => 'node_content',
'title' => t('Show title'),
'value' => $this
->get_option('show_title') ? t('Yes') : t('No'),
);
}