function EntityReferenceItem::storageSettingsSummary
Same name in other branches
- 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem::storageSettingsSummary()
1 method overrides EntityReferenceItem::storageSettingsSummary()
- FileItem::storageSettingsSummary in core/
modules/ file/ src/ Plugin/ Field/ FieldType/ FileItem.php
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ EntityReferenceItem.php, line 116
Class
- EntityReferenceItem
- Defines the 'entity_reference' entity field type.
Namespace
Drupal\Core\Field\Plugin\Field\FieldTypeCode
public static function storageSettingsSummary(FieldStorageDefinitionInterface $storage_definition) : array {
$summary = parent::storageSettingsSummary($storage_definition);
$target_type = $storage_definition->getSetting('target_type');
$target_type_info = \Drupal::entityTypeManager()->getDefinition($target_type);
if (!empty($target_type_info)) {
$summary[] = new TranslatableMarkup('Reference type: @entity_type', [
'@entity_type' => $target_type_info->getLabel(),
]);
}
return $summary;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.