Loading core/modules/quickedit/src/MetadataGenerator.php +5 −1 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ use Drupal\Component\Plugin\PluginManagerInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Field\FieldItemListInterface; use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\quickedit\Access\QuickEditEntityFieldAccessCheckInterface; use Drupal\Core\Entity\Entity\EntityViewDisplay; Loading Loading @@ -55,7 +56,10 @@ public function __construct(QuickEditEntityFieldAccessCheckInterface $access_che */ public function generateEntityMetadata(EntityInterface $entity) { return [ 'label' => $entity->label(), 'label' => $entity->access('view label') ? $entity->label() : new TranslatableMarkup('@label @id', [ '@label' => $entity->getEntityType()->getSingularLabel(), '@id' => $entity->id() ]) ]; } Loading Loading
core/modules/quickedit/src/MetadataGenerator.php +5 −1 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ use Drupal\Component\Plugin\PluginManagerInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Field\FieldItemListInterface; use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\quickedit\Access\QuickEditEntityFieldAccessCheckInterface; use Drupal\Core\Entity\Entity\EntityViewDisplay; Loading Loading @@ -55,7 +56,10 @@ public function __construct(QuickEditEntityFieldAccessCheckInterface $access_che */ public function generateEntityMetadata(EntityInterface $entity) { return [ 'label' => $entity->label(), 'label' => $entity->access('view label') ? $entity->label() : new TranslatableMarkup('@label @id', [ '@label' => $entity->getEntityType()->getSingularLabel(), '@id' => $entity->id() ]) ]; } Loading