You are here

protected function ViewsAddButtonArea::defineOptions in Views Add Button 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/views/area/ViewsAddButtonArea.php \Drupal\views_add_button\Plugin\views\area\ViewsAddButtonArea::defineOptions()

Define the available options.

Return value

array Array of available options for views_add_button form.

Overrides TokenizeAreaPluginBase::defineOptions

File

src/Plugin/views/area/ViewsAddButtonArea.php, line 96

Class

ViewsAddButtonArea
Defines a views area plugin.

Namespace

Drupal\views_add_button\Plugin\views\area

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['type'] = [
    'default' => 'node',
  ];
  $options['render_plugin'] = [
    'default' => '',
  ];
  $options['access_plugin'] = [
    'default' => '',
  ];
  $options['context'] = [
    'default' => '',
  ];
  $options['button_text'] = [
    'default' => '',
  ];
  $options['button_classes'] = [
    'default' => '',
  ];
  $options['button_attributes'] = [
    'default' => '',
  ];
  $options['button_access_denied'] = [
    'default' => [
      'format' => NULL,
      'value' => '',
    ],
  ];
  $options['button_prefix'] = [
    'default' => [
      'format' => NULL,
      'value' => '',
    ],
  ];
  $options['button_suffix'] = [
    'default' => [
      'format' => NULL,
      'value' => '',
    ],
  ];
  $options['query_string'] = [
    'default' => '',
  ];
  $options['destination'] = [
    'default' => TRUE,
  ];
  $options['tokenize'] = [
    'default' => FALSE,
    'bool' => TRUE,
  ];
  return $options;
}