function freepager_plugin_display_pagerblock::options_summary in Free pager 7.2
Provide the summary for page options in the views UI.
This output is returned as an array.
Overrides views_plugin_display_block::options_summary
File
- ./
freepager_plugin_display_pagerblock.inc, line 28 - Contains the block display plugin.
Class
- freepager_plugin_display_pagerblock
- 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);
// Remove the category set by the parent class before adding our own.
unset($categories['block']);
$categories['freepager_block'] = array(
'title' => t('Pager block settings'),
'column' => 'second',
'build' => array(
'#weight' => -10,
),
);
$options['block_description']['category'] = 'freepager_block';
// Get all the fields present in this view, to use as setting summaries.
$field_labels = $this
->get_field_labels();
foreach (freepager_settings() as $name => $setting) {
$options[$name] = array(
'category' => 'freepager_block',
'title' => $setting['label'],
'value' => isset($field_labels[$this
->get_option($name)]) ? $field_labels[$this
->get_option($name)] : t('(none)'),
);
}
// The 'loop' option is treated differently. It isn't a field select list.
$yesno = array(
0 => t('no'),
1 => t('yes'),
);
$options['loop']['value'] = $yesno[$this
->get_option($name)];
}