You are here

public function TestExample::defineOptions in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/tests/modules/views_test_data/src/Plugin/views/area/TestExample.php \Drupal\views_test_data\Plugin\views\area\TestExample::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 AreaPluginBase::defineOptions

File

core/modules/views/tests/modules/views_test_data/src/Plugin/views/area/TestExample.php, line 28

Class

TestExample
Test area plugin.

Namespace

Drupal\views_test_data\Plugin\views\area

Code

public function defineOptions() {
  $options = parent::defineOptions();
  $options['string'] = [
    'default' => '',
  ];
  $options['custom_access'] = [
    'default' => TRUE,
  ];
  return $options;
}