protected function DisplayPluginBase::defineOptions in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::defineOptions()
Information about options for all kinds of purposes will be held here.
'option_name' => array(
- 'default' => default value,
- '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().
),
Return value
array Returns the options of this handler/plugin.
Overrides PluginBase::defineOptions
7 calls to DisplayPluginBase::defineOptions()
- Attachment::defineOptions in core/
modules/ views/ src/ Plugin/ views/ display/ Attachment.php - Information about options for all kinds of purposes will be held here.
- Block::defineOptions in core/
modules/ views/ src/ Plugin/ views/ display/ Block.php - Information about options for all kinds of purposes will be held here.
- DisplayPluginBase::initDisplay in core/
modules/ views/ src/ Plugin/ views/ display/ DisplayPluginBase.php - Initializes the display plugin.
- DisplayPluginBase::mergeDefaults in core/
modules/ views/ src/ Plugin/ views/ display/ DisplayPluginBase.php - Merges default values for all plugin types.
- DisplayTest::defineOptions in core/
modules/ views/ tests/ modules/ views_test_data/ src/ Plugin/ views/ display/ DisplayTest.php - Information about options for all kinds of purposes will be held here.
5 methods override DisplayPluginBase::defineOptions()
- Attachment::defineOptions in core/
modules/ views/ src/ Plugin/ views/ display/ Attachment.php - Information about options for all kinds of purposes will be held here.
- Block::defineOptions in core/
modules/ views/ src/ Plugin/ views/ display/ Block.php - Information about options for all kinds of purposes will be held here.
- DisplayTest::defineOptions in core/
modules/ views/ tests/ modules/ views_test_data/ src/ Plugin/ views/ display/ DisplayTest.php - Information about options for all kinds of purposes will be held here.
- EntityReference::defineOptions in core/
modules/ views/ src/ Plugin/ views/ display/ EntityReference.php - Information about options for all kinds of purposes will be held here.
- PathPluginBase::defineOptions in core/
modules/ views/ src/ Plugin/ views/ display/ PathPluginBase.php - Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase:defineOptions().
File
- core/
modules/ views/ src/ Plugin/ views/ display/ DisplayPluginBase.php, line 463 - Contains \Drupal\views\Plugin\views\display\DisplayPluginBase.
Class
- DisplayPluginBase
- Base class for views display plugins.
Namespace
Drupal\views\Plugin\views\displayCode
protected function defineOptions() {
$options = array(
'defaults' => array(
'default' => array(
'access' => TRUE,
'cache' => TRUE,
'query' => TRUE,
'title' => TRUE,
'css_class' => TRUE,
'display_description' => FALSE,
'use_ajax' => TRUE,
'hide_attachment_summary' => TRUE,
'show_admin_links' => TRUE,
'pager' => TRUE,
'use_more' => TRUE,
'use_more_always' => TRUE,
'use_more_text' => TRUE,
'exposed_form' => TRUE,
'link_display' => TRUE,
'link_url' => TRUE,
'group_by' => TRUE,
'style' => TRUE,
'row' => TRUE,
'header' => TRUE,
'footer' => TRUE,
'empty' => TRUE,
'relationships' => TRUE,
'fields' => TRUE,
'sorts' => TRUE,
'arguments' => TRUE,
'filters' => TRUE,
'filter_groups' => TRUE,
),
),
'title' => array(
'default' => '',
),
'enabled' => array(
'default' => TRUE,
),
'display_comment' => array(
'default' => '',
),
'css_class' => array(
'default' => '',
),
'display_description' => array(
'default' => '',
),
'use_ajax' => array(
'default' => FALSE,
),
'hide_attachment_summary' => array(
'default' => FALSE,
),
'show_admin_links' => array(
'default' => TRUE,
),
'use_more' => array(
'default' => FALSE,
),
'use_more_always' => array(
'default' => TRUE,
),
'use_more_text' => array(
'default' => 'more',
),
'link_display' => array(
'default' => '',
),
'link_url' => array(
'default' => '',
),
'group_by' => array(
'default' => FALSE,
),
'rendering_language' => array(
'default' => '***LANGUAGE_entity_translation***',
),
// These types are all plugins that can have individual settings
// and therefore need special handling.
'access' => array(
'contains' => array(
'type' => array(
'default' => 'none',
),
'options' => array(
'default' => array(),
),
),
'merge_defaults' => array(
$this,
'mergePlugin',
),
),
'cache' => array(
'contains' => array(
'type' => array(
'default' => 'tag',
),
'options' => array(
'default' => array(),
),
),
'merge_defaults' => array(
$this,
'mergePlugin',
),
),
'query' => array(
'contains' => array(
'type' => array(
'default' => 'views_query',
),
'options' => array(
'default' => array(),
),
),
'merge_defaults' => array(
$this,
'mergePlugin',
),
),
'exposed_form' => array(
'contains' => array(
'type' => array(
'default' => 'basic',
),
'options' => array(
'default' => array(),
),
),
'merge_defaults' => array(
$this,
'mergePlugin',
),
),
'pager' => array(
'contains' => array(
'type' => array(
'default' => 'mini',
),
'options' => array(
'default' => array(),
),
),
'merge_defaults' => array(
$this,
'mergePlugin',
),
),
'style' => array(
'contains' => array(
'type' => array(
'default' => 'default',
),
'options' => array(
'default' => array(),
),
),
'merge_defaults' => array(
$this,
'mergePlugin',
),
),
'row' => array(
'contains' => array(
'type' => array(
'default' => 'fields',
),
'options' => array(
'default' => array(),
),
),
'merge_defaults' => array(
$this,
'mergePlugin',
),
),
'exposed_block' => array(
'default' => FALSE,
),
'header' => array(
'default' => array(),
'merge_defaults' => array(
$this,
'mergeHandler',
),
),
'footer' => array(
'default' => array(),
'merge_defaults' => array(
$this,
'mergeHandler',
),
),
'empty' => array(
'default' => array(),
'merge_defaults' => array(
$this,
'mergeHandler',
),
),
// We want these to export last.
// These are the 5 handler types.
'relationships' => array(
'default' => array(),
'merge_defaults' => array(
$this,
'mergeHandler',
),
),
'fields' => array(
'default' => array(),
'merge_defaults' => array(
$this,
'mergeHandler',
),
),
'sorts' => array(
'default' => array(),
'merge_defaults' => array(
$this,
'mergeHandler',
),
),
'arguments' => array(
'default' => array(),
'merge_defaults' => array(
$this,
'mergeHandler',
),
),
'filter_groups' => array(
'contains' => array(
'operator' => array(
'default' => 'AND',
),
'groups' => array(
'default' => array(
1 => 'AND',
),
),
),
),
'filters' => array(
'default' => array(),
),
);
if (!$this
->usesPager()) {
$options['defaults']['default']['pager'] = FALSE;
$options['pager']['contains']['type']['default'] = 'some';
}
if ($this
->isDefaultDisplay()) {
unset($options['defaults']);
}
$options['display_extenders'] = [
'default' => [],
];
// First allow display extenders to provide new options.
foreach ($this->extenders as $extender_id => $extender) {
$options['display_extenders']['contains'][$extender_id]['contains'] = $extender
->defineOptions();
}
// Then allow display extenders to alter existing default values.
foreach ($this->extenders as $extender) {
$extender
->defineOptionsAlter($options);
}
return $options;
}