You are here

protected function Serializer::defineOptions in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/rest/src/Plugin/views/style/Serializer.php \Drupal\rest\Plugin\views\style\Serializer::defineOptions()
  2. 10 core/modules/rest/src/Plugin/views/style/Serializer.php \Drupal\rest\Plugin\views\style\Serializer::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 StylePluginBase::defineOptions

File

core/modules/rest/src/Plugin/views/style/Serializer.php, line 86

Class

Serializer
The style plugin for serialized output formats.

Namespace

Drupal\rest\Plugin\views\style

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['formats'] = [
    'default' => [],
  ];
  return $options;
}