You are here

protected function Page::defineOptions in Views (for Drupal 7) 8.3

Information about options for all kinds of purposes will be held here. @code 'option_name' => array(

  • 'default' => default value,
  • 'translatable' => (optional) TRUE/FALSE (wrap in t() on export if true),
  • '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 export format to TRUE/FALSE instead of 1/0.

),

Return value

array Returns the options of this handler/plugin.

Overrides DisplayPluginBase::defineOptions

1 call to Page::defineOptions()
Feed::defineOptions in lib/Drupal/views/Plugin/views/display/Feed.php
Information about options for all kinds of purposes will be held here. @code 'option_name' => array(
1 method overrides Page::defineOptions()
Feed::defineOptions in lib/Drupal/views/Plugin/views/display/Feed.php
Information about options for all kinds of purposes will be held here. @code 'option_name' => array(

File

lib/Drupal/views/Plugin/views/display/Page.php, line 45
Definition of Drupal\views\Plugin\views\display\Page.

Class

Page
The plugin that handles a full page.

Namespace

Drupal\views\Plugin\views\display

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['path'] = array(
    'default' => '',
  );
  $options['menu'] = array(
    'contains' => array(
      'type' => array(
        'default' => 'none',
      ),
      // Do not translate menu and title as menu system will.
      'title' => array(
        'default' => '',
        'translatable' => FALSE,
      ),
      'description' => array(
        'default' => '',
        'translatable' => FALSE,
      ),
      'weight' => array(
        'default' => 0,
      ),
      'name' => array(
        'default' => variable_get('menu_default_node_menu', 'navigation'),
      ),
      'context' => array(
        'default' => '',
      ),
    ),
  );
  $options['tab_options'] = array(
    'contains' => array(
      'type' => array(
        'default' => 'none',
      ),
      // Do not translate menu and title as menu system will.
      'title' => array(
        'default' => '',
        'translatable' => FALSE,
      ),
      'description' => array(
        'default' => '',
        'translatable' => FALSE,
      ),
      'weight' => array(
        'default' => 0,
      ),
      'name' => array(
        'default' => 'navigation',
      ),
    ),
  );
  return $options;
}