function views_plugin_display::option_definition in Views (for Drupal 7) 6.2
Same name and namespace in other branches
- 6.3 plugins/views_plugin_display.inc \views_plugin_display::option_definition()
- 7.3 plugins/views_plugin_display.inc \views_plugin_display::option_definition()
Information about options for all kinds of purposes will be held here.
'option_name' => array(
- 'default' => default value,
- 'translatable' => TRUE/FALSE (wrap in t() on export if true),
- 'contains' => array of items this contains, with its own defaults, etc.
If contains is set, the default will be ignored and assumed to
be array()
),
Each option may have any of the following functions:
- export_option_OPTIONNAME -- Special export handling if necessary.
- translate_option_OPTIONNAME -- Special handling for translating data within the option, if necessary.
Overrides views_object::option_definition
3 calls to views_plugin_display::option_definition()
- views_plugin_display_attachment::option_definition in plugins/
views_plugin_display_attachment.inc - Information about options for all kinds of purposes will be held here.
- views_plugin_display_block::option_definition in plugins/
views_plugin_display_block.inc - Information about options for all kinds of purposes will be held here.
- views_plugin_display_page::option_definition in plugins/
views_plugin_display_page.inc - Information about options for all kinds of purposes will be held here.
3 methods override views_plugin_display::option_definition()
- views_plugin_display_attachment::option_definition in plugins/
views_plugin_display_attachment.inc - Information about options for all kinds of purposes will be held here.
- views_plugin_display_block::option_definition in plugins/
views_plugin_display_block.inc - Information about options for all kinds of purposes will be held here.
- views_plugin_display_page::option_definition in plugins/
views_plugin_display_page.inc - Information about options for all kinds of purposes will be held here.
File
- plugins/
views_plugin_display.inc, line 238 - Contains the base display plugin.
Class
- views_plugin_display
- The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.
Code
function option_definition() {
$options = array(
'defaults' => array(
'default' => array(
'access' => TRUE,
'cache' => TRUE,
'title' => TRUE,
'css_class' => TRUE,
'header' => TRUE,
'header_format' => TRUE,
'header_empty' => TRUE,
'footer' => TRUE,
'footer_format' => TRUE,
'footer_empty' => TRUE,
'empty' => TRUE,
'empty_format' => TRUE,
'use_ajax' => TRUE,
'items_per_page' => TRUE,
'offset' => TRUE,
'use_pager' => TRUE,
'pager_element' => TRUE,
'use_more' => TRUE,
'use_more_always' => TRUE,
'use_more_text' => TRUE,
'distinct' => TRUE,
'exposed_block' => TRUE,
'link_display' => TRUE,
'style_plugin' => TRUE,
'style_options' => TRUE,
'row_plugin' => TRUE,
'row_options' => TRUE,
'relationships' => TRUE,
'fields' => TRUE,
'sorts' => TRUE,
'arguments' => TRUE,
'filters' => TRUE,
),
),
'relationships' => array(
'default' => array(),
'export' => 'export_item',
),
'fields' => array(
'default' => array(),
'export' => 'export_item',
),
'sorts' => array(
'default' => array(),
'export' => 'export_item',
),
'arguments' => array(
'default' => array(),
'export' => 'export_item',
),
'filters' => array(
'default' => array(),
'export' => 'export_item',
),
'access' => array(
'contains' => array(
'type' => array(
'default' => 'none',
),
),
),
'cache' => array(
'contains' => array(
'type' => array(
'default' => 'none',
),
),
),
'title' => array(
'default' => '',
'translatable' => TRUE,
),
'css_class' => array(
'default' => '',
'translatable' => FALSE,
),
'header' => array(
'default' => '',
'translatable' => TRUE,
),
'header_format' => array(
'default' => FILTER_FORMAT_DEFAULT,
),
'header_empty' => array(
'default' => FALSE,
),
'footer' => array(
'default' => '',
'translatable' => TRUE,
),
'footer_format' => array(
'default' => FILTER_FORMAT_DEFAULT,
),
'footer_empty' => array(
'default' => FALSE,
),
'empty' => array(
'default' => '',
'translatable' => TRUE,
),
'empty_format' => array(
'default' => FILTER_FORMAT_DEFAULT,
),
'use_ajax' => array(
'default' => FALSE,
),
'items_per_page' => array(
'default' => 10,
),
'offset' => array(
'default' => 0,
),
'use_pager' => array(
'default' => FALSE,
),
'pager_element' => array(
'default' => 0,
),
'use_more' => array(
'default' => FALSE,
),
'use_more_always' => array(
'default' => FALSE,
),
'use_more_text' => array(
'default' => 'more',
'translatable' => TRUE,
),
'link_display' => array(
'default' => '',
),
'distinct' => array(
'default' => FALSE,
),
'style_plugin' => array(
'default' => 'default',
),
'style_options' => array(
'default' => array(),
),
'row_plugin' => array(
'default' => 'fields',
),
'row_options' => array(
'default' => array(),
),
'exposed_block' => array(
'default' => FALSE,
),
);
if ($this
->is_default_display()) {
unset($options['defaults']);
}
return $options;
}