protected function ReferenceWidget::getSelectionHandlerSetting in Select (or other) 4.x
Same name and namespace in other branches
- 8 src/Plugin/Field/FieldWidget/ReferenceWidget.php \Drupal\select_or_other\Plugin\Field\FieldWidget\ReferenceWidget::getSelectionHandlerSetting()
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/ ReferenceWidget.php - Returns the name of the bundle which will be used for autocreated entities.
- ReferenceWidget::getOptions in src/
Plugin/ Field/ FieldWidget/ ReferenceWidget.php - Returns the array of options for the widget.
File
- src/
Plugin/ Field/ FieldWidget/ ReferenceWidget.php, line 193
Class
- ReferenceWidget
- Plugin implementation of the 'select_or_other_reference' widget.
Namespace
Drupal\select_or_other\Plugin\Field\FieldWidgetCode
protected function getSelectionHandlerSetting($setting_name) {
$settings = $this
->getFieldSetting('handler_settings');
return isset($settings[$setting_name]) ? $settings[$setting_name] : NULL;
}