You are here

public static function EntityReferenceFieldFormatter::disableQuickEdit in Entity Embed 8

Disables Quick Edit for the embedded media by removing its attributes.

Parameters

array $build: The render array for the embedded media.

Return value

array The updated render array.

See also

quickedit_entity_view_alter()

File

src/Plugin/entity_embed/EntityEmbedDisplay/EntityReferenceFieldFormatter.php, line 203

Class

EntityReferenceFieldFormatter
Entity Embed Display reusing entity reference field formatters.

Namespace

Drupal\entity_embed\Plugin\entity_embed\EntityEmbedDisplay

Code

public static function disableQuickEdit(array $build) {
  unset($build['#attributes']['data-quickedit-entity-id']);
  return $build;
}