You are here

public function SearchApiFieldTrait::defineOptions in Search API 8

Defines the options used by this plugin.

Return value

array Returns the options of this handler/plugin.

See also

\Drupal\views\Plugin\views\PluginBase::defineOptions()

2 calls to SearchApiFieldTrait::defineOptions()
SearchApiEntity::defineOptions in src/Plugin/views/field/SearchApiEntity.php
Defines the options used by this plugin.
SearchApiNumeric::defineOptions in src/Plugin/views/field/SearchApiNumeric.php
Information about options for all kinds of purposes will be held here.
3 methods override SearchApiFieldTrait::defineOptions()
SearchApiEntity::defineOptions in src/Plugin/views/field/SearchApiEntity.php
Defines the options used by this plugin.
SearchApiEntityField::defineOptions in src/Plugin/views/field/SearchApiEntityField.php
Defines the options used by this plugin.
SearchApiRenderedItem::defineOptions in src/Plugin/views/field/SearchApiRenderedItem.php
Defines the options used by this plugin.

File

src/Plugin/views/field/SearchApiFieldTrait.php, line 224

Class

SearchApiFieldTrait
Provides a trait to use for Search API Views field handlers.

Namespace

Drupal\search_api\Plugin\views\field

Code

public function defineOptions() {
  $options = parent::defineOptions();
  $options['link_to_item'] = [
    'default' => FALSE,
  ];
  $options['use_highlighting'] = [
    'default' => FALSE,
  ];
  if ($this
    ->isMultiple()) {
    $options['multi_type'] = [
      'default' => 'separator',
    ];
    $options['multi_separator'] = [
      'default' => ', ',
    ];
  }
  return $options;
}