protected function ReferenceWidget::getBundleKey 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::getBundleKey()
Retrieves the key used to indicate a bundle for the entity type.
@codeCoverageIgnore Ignore this method because if any of the called core functions does not return the expected result, we've got other problems on our hands.
Return value
string The key used to indicate a bundle for the entity type referenced by this widget's field.
1 call to ReferenceWidget::getBundleKey()
- 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 103
Class
- ReferenceWidget
- Plugin implementation of the 'select_or_other_reference' widget.
Namespace
Drupal\select_or_other\Plugin\Field\FieldWidgetCode
protected function getBundleKey() {
$entity_keys = $this
->getEntityStorage()
->getEntityType()
->get('entity_keys');
return $entity_keys['bundle'];
}