function EntityReferenceAutocompleteWidget::getSelectionHandlerSetting

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

Returns the value of a setting for the entity reference selection handler.

Parameters

string $setting_name: The setting name.

Return value

mixed The setting value.

1 call to EntityReferenceAutocompleteWidget::getSelectionHandlerSetting()
EntityReferenceAutocompleteWidget::getAutocreateBundle in core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php
Returns the name of the bundle which will be used for autocreated entities.

File

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

Class

EntityReferenceAutocompleteWidget
Plugin implementation of the 'entity_reference_autocomplete' widget.

Namespace

Drupal\Core\Field\Plugin\Field\FieldWidget

Code

protected function getSelectionHandlerSetting($setting_name) {
    $settings = $this->getFieldSetting('handler_settings');
    return $settings[$setting_name] ?? NULL;
}

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