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

7 calls to AreaPluginBase::defineOptions()
AreaPluginBase::init in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php
Overrides Drupal\views\Plugin\views\HandlerBase::init().
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().
Text::defineOptions in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/Text.php
Information about options for all kinds of purposes will be held here. @code 'option_name' => array(
TextCustom::defineOptions in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/TextCustom.php
Information about options for all kinds of purposes will be held here. @code 'option_name' => array(

... See full list

7 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().
Text::defineOptions in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/Text.php
Information about options for all kinds of purposes will be held here. @code 'option_name' => array(
TextCustom::defineOptions in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/TextCustom.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 53
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['label'] = array(
    'default' => $label,
    'translatable' => TRUE,
  );
  $options['empty'] = array(
    'default' => FALSE,
    'bool' => TRUE,
  );
  return $options;
}