protected function AreaPluginBase::defineOptions

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 HandlerBase::defineOptions

5 calls to AreaPluginBase::defineOptions()
Result::defineOptions in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/Result.php
Information about options for all kinds of purposes will be held here. @code 'option_name' => array(
TestExample::defineOptions in drupal/core/modules/views/tests/views_test_data/lib/Drupal/views_test_data/Plugin/views/area/TestExample.php
Overrides Drupal\views\Plugin\views\area\AreaPluginBase::option_definition().
Title::defineOptions in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/Title.php
Overrides Drupal\views\Plugin\views\AreaPluginBase::defineOptions().
TokenizeAreaPluginBase::defineOptions in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/TokenizeAreaPluginBase.php
Information about options for all kinds of purposes will be held here. @code 'option_name' => array(
View::defineOptions in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/View.php
Information about options for all kinds of purposes will be held here. @code 'option_name' => array(
6 methods override AreaPluginBase::defineOptions()
Broken::defineOptions in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/Broken.php
Information about options for all kinds of purposes will be held here. @code 'option_name' => array(
Result::defineOptions in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/Result.php
Information about options for all kinds of purposes will be held here. @code 'option_name' => array(
TestExample::defineOptions in drupal/core/modules/views/tests/views_test_data/lib/Drupal/views_test_data/Plugin/views/area/TestExample.php
Overrides Drupal\views\Plugin\views\area\AreaPluginBase::option_definition().
Title::defineOptions in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/Title.php
Overrides Drupal\views\Plugin\views\AreaPluginBase::defineOptions().
TokenizeAreaPluginBase::defineOptions in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/TokenizeAreaPluginBase.php
Information about options for all kinds of purposes will be held here. @code 'option_name' => array(

... See full list

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php, line 50
Definition of Drupal\views\Plugin\views\area\AreaPluginBase.

Class

AreaPluginBase
Base class for area handlers.

Namespace

Drupal\views\Plugin\views\area

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $this->definition['field'] = !empty($this->definition['field']) ? $this->definition['field'] : '';
  $label = !empty($this->definition['label']) ? $this->definition['label'] : $this->definition['field'];
  $options['admin_label']['default'] = $label;
  $options['empty'] = array(
    'default' => FALSE,
    'bool' => TRUE,
  );
  return $options;
}