protected function AreaPluginBase::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 HandlerBase::defineOptions
6 calls to AreaPluginBase::defineOptions()
- AreaPluginBase::init in lib/
Drupal/ views/ Plugin/ views/ area/ AreaPluginBase.php - Overrides Drupal\views\Plugin\views\HandlerBase::init().
- Result::defineOptions in 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 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 lib/
Drupal/ views/ Plugin/ views/ area/ Text.php - Information about options for all kinds of purposes will be held here. @code 'option_name' => array(
- Title::defineOptions in lib/
Drupal/ views/ Plugin/ views/ area/ Title.php - Overrides Drupal\views\Plugin\views\AreaPluginBase::defineOptions().
6 methods override AreaPluginBase::defineOptions()
- Broken::defineOptions in 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 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 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 lib/
Drupal/ views/ Plugin/ views/ area/ Text.php - Information about options for all kinds of purposes will be held here. @code 'option_name' => array(
- Title::defineOptions in lib/
Drupal/ views/ Plugin/ views/ area/ Title.php - Overrides Drupal\views\Plugin\views\AreaPluginBase::defineOptions().
File
- 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\areaCode
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;
}