function EntityReferenceAutocompleteWidget::getMatchOperatorOptions

Same name in other branches
  1. 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\EntityReferenceAutocompleteWidget::getMatchOperatorOptions()
  2. 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\EntityReferenceAutocompleteWidget::getMatchOperatorOptions()
  3. 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\EntityReferenceAutocompleteWidget::getMatchOperatorOptions()

Returns the options for the match operator.

Return value

array List of options.

2 calls to EntityReferenceAutocompleteWidget::getMatchOperatorOptions()
EntityReferenceAutocompleteWidget::settingsForm in core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php
Returns a form to configure settings for the widget.
EntityReferenceAutocompleteWidget::settingsSummary in core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php
Returns a short summary for the current widget settings.

File

core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php, line 216

Class

EntityReferenceAutocompleteWidget
Plugin implementation of the 'entity_reference_autocomplete' widget.

Namespace

Drupal\Core\Field\Plugin\Field\FieldWidget

Code

protected function getMatchOperatorOptions() {
    return [
        'STARTS_WITH' => $this->t('Starts with'),
        'CONTAINS' => $this->t('Contains'),
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.