You are here

protected function LinkBase::defineOptions in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/field/LinkBase.php \Drupal\views\Plugin\views\field\LinkBase::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

1 call to LinkBase::defineOptions()
EntityLink::defineOptions in core/modules/views/src/Plugin/views/field/EntityLink.php
Information about options for all kinds of purposes will be held here.
1 method overrides LinkBase::defineOptions()
EntityLink::defineOptions in core/modules/views/src/Plugin/views/field/EntityLink.php
Information about options for all kinds of purposes will be held here.

File

core/modules/views/src/Plugin/views/field/LinkBase.php, line 134

Class

LinkBase
Field handler to present a link to an entity.

Namespace

Drupal\views\Plugin\views\field

Code

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