You are here

protected function ReferenceWidget::getSelectionHandlerSetting in Select (or other) 8.3

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

@todo This is shamelessly copied from EntityAutocomplete. We should probably file a core issue to turn this into a trait. The same goes for $this::getAutoCreateBundle()

@codeCoverageIgnore Ignore this function because it is a straight copy->paste.

Parameters

string $setting_name: The setting name.

Return value

mixed The setting value.

2 calls to ReferenceWidget::getSelectionHandlerSetting()
ReferenceWidget::getAutocreateBundle in src/Plugin/Field/FieldWidget/EntityReference/ReferenceWidget.php
Returns the name of the bundle which will be used for autocreated entities.
ReferenceWidget::getOptions in src/Plugin/Field/FieldWidget/EntityReference/ReferenceWidget.php
Returns the array of options for the widget.

File

src/Plugin/Field/FieldWidget/EntityReference/ReferenceWidget.php, line 162
Contains \Drupal\select_or_other\Plugin\Field\FieldWidget\EntityReference\ReferenceWidget.

Class

ReferenceWidget
Plugin implementation of the 'select_or_other_reference' widget.

Namespace

Drupal\select_or_other\Plugin\Field\FieldWidget\EntityReference

Code

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