1 views_plugin_display_block.inc | views_plugin_display_block::option_definition() |
Information about options for all kinds of purposes will be held here. @code 'option_name' => array(
- 'default' => default value,
- 'translatable' => (optional) TRUE/FALSE,
- 'contains' => (optional) array of items this contains, with its own defaults, etc. If contains is set, the default will be ignored and assumed to be array().
- 'bool' => (optional) TRUE/FALSE Is the value a boolean value. This will change the internal format to TRUE/FALSE instead of 1/0.
),
Return value
array: Returns the options of this handler/plugin.
Overrides views_plugin_display::option_definition
See also
views_object::unpack_translatable()
File
- core/
modules/ views/ plugins/ views_plugin_display_block.inc, line 20 - Contains the block display plugin.
Class
- views_plugin_display_block
- The plugin that handles a block.
Code
function option_definition() {
$options = parent::option_definition();
$description = '';
if (isset($this->view)) {
if ($this->display->display_title == $this->definition['title']) {
$description = t('View: @view', array('@view' => t($this->view->get_human_name())));
}
else {
$description = t('View: @view (@display)', array('@view' => t($this->view->get_human_name()), '@display' => t($this->display->display_title)));
}
}
$options['block_description'] = array('default' => $description, 'translatable' => TRUE);
$options['block_caching'] = array('default' => BACKDROP_NO_CACHE);
$options['allow'] = array(
'contains' => array(
'use_pager' => array('default' => FALSE),
'items_per_page' => array('default' => FALSE),
'offset' => array('default' => FALSE),
'link_to_view' => array('default' => FALSE),
'more_link' => array('default' => FALSE),
'path_override' => array('default' => FALSE),
'exposed_form' => array('default' => FALSE),
'fields_override' => array('default' => FALSE),
),
);
$options['argument_input'] = array('default' => array());
$options['link_to_view'] = array('default' => 0);
$options['inherit_path'] = array('default' => 0);
return $options;
}