You are here

protected function Select2EntityReferenceWidget::getSelectionHandlerSetting in Select 2 8

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

@uses \Drupal\Core\Field\Plugin\Field\FieldWidget\EntityReferenceAutocompleteWidget::getSelectionHandlerSetting(). This is copied from core.

Parameters

string $setting_name: The setting name.

Return value

mixed The setting value.

2 calls to Select2EntityReferenceWidget::getSelectionHandlerSetting()
Select2EntityReferenceWidget::formElement in src/Plugin/Field/FieldWidget/Select2EntityReferenceWidget.php
Returns the form for a single field widget.
Select2EntityReferenceWidget::getAutocreateBundle in src/Plugin/Field/FieldWidget/Select2EntityReferenceWidget.php
Returns the name of the bundle which will be used for autocreated entities.

File

src/Plugin/Field/FieldWidget/Select2EntityReferenceWidget.php, line 297

Class

Select2EntityReferenceWidget
Plugin implementation of the 'select2' widget.

Namespace

Drupal\select2\Plugin\Field\FieldWidget

Code

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