You are here

protected function ViewsAddButtonField::defineOptions in Views Add Button 8

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

Define the available options.

Return value

array Array of available options for views_add_button form.

Overrides FieldPluginBase::defineOptions

File

src/Plugin/views/field/ViewsAddButtonField.php, line 38

Class

ViewsAddButtonField
Defines a views field plugin.

Namespace

Drupal\views_add_button\Plugin\views\field

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,
  ];
  $options['preserve_tags'] = [
    'default' => '',
  ];
  return $options;
}