You are here

protected function BaseUrl::defineOptions in Views base url 2.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/views/field/BaseUrl.php \Drupal\views_base_url\Plugin\views\field\BaseUrl::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 FieldPluginBase::defineOptions

File

src/Plugin/views/field/BaseUrl.php, line 57

Class

BaseUrl
A handler to output site's base url.

Namespace

Drupal\views_base_url\Plugin\views\field

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['show_link'] = [
    'default' => FALSE,
  ];
  $options['show_link_options']['contains'] = [
    'link_path' => [
      'default' => '',
    ],
    'link_text' => [
      'default' => '',
    ],
    'link_class' => [
      'default' => '',
    ],
    'link_title' => [
      'default' => '',
    ],
    'link_rel' => [
      'default' => '',
    ],
    'link_fragment' => [
      'default' => '',
    ],
    'link_query' => [
      'default' => '',
    ],
    'link_target' => [
      'default' => '',
    ],
  ];
  return $options;
}