public function Serializer::buildOptionsForm

Provide a form to edit options for this plugin.

Overrides StylePluginBase::buildOptionsForm

File

drupal/core/modules/rest/lib/Drupal/rest/Plugin/views/style/Serializer.php, line 94
Contains \Drupal\rest\Plugin\views\style\Serializer.

Class

Serializer
The style plugin for serialized output formats.

Namespace

Drupal\rest\Plugin\views\style

Code

public function buildOptionsForm(&$form, &$form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['formats'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Accepted request formats'),
    '#description' => t('Request formats that will be allowed in responses. If none are selected all formats will be allowed.'),
    '#options' => drupal_map_assoc($this->formats),
    '#default_value' => $this->options['formats'],
  );
}