You are here

protected function Entity::defineOptions in Zircon Profile 8

Same name in this branch
  1. 8 core/modules/views/src/Plugin/views/area/Entity.php \Drupal\views\Plugin\views\area\Entity::defineOptions()
  2. 8 core/modules/views/src/Plugin/views/argument_validator/Entity.php \Drupal\views\Plugin\views\argument_validator\Entity::defineOptions()
Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Plugin/views/area/Entity.php \Drupal\views\Plugin\views\area\Entity::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 TokenizeAreaPluginBase::defineOptions

File

core/modules/views/src/Plugin/views/area/Entity.php, line 80
Contains \Drupal\views\Plugin\views\area\Entity.

Class

Entity
Provides an area handler which renders an entity in a certain view mode.

Namespace

Drupal\views\Plugin\views\area

Code

protected function defineOptions() {
  $options = parent::defineOptions();

  // Per default we enable tokenize, as this is the most common use case for
  // this handler.
  $options['tokenize']['default'] = TRUE;

  // Contains the config target identifier for the entity.
  $options['target'] = [
    'default' => '',
  ];
  $options['view_mode'] = [
    'default' => 'default',
  ];
  $options['bypass_access'] = [
    'default' => FALSE,
  ];
  return $options;
}