protected function ReferenceWidget::getEntityStorage in Select (or other) 8.3
Retrieves the entityStorage object
@codeCoverageIgnore Ignore this method because if ::getFieldSetting() or entityTypeManager does not return the expected result, we've got other problems on our hands.
Return value
\Drupal\Core\Entity\EntityStorageInterface EntityStorage for entity types that can be referenced by this widget.
1 call to ReferenceWidget::getEntityStorage()
- 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 58 - 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\EntityReferenceCode
protected function getEntityStorage() {
$target_type = $this
->getFieldSetting('target_type');
return \Drupal::entityTypeManager()
->getStorage($target_type);
}