public static function EntityReferenceFieldFormatter::disableContextualLinks in Entity Embed 8
Disables Contextual Links for the embedded media by removing its property.
Parameters
array $build: The render array for the embedded media.
Return value
array The updated render array.
See also
\Drupal\Core\Entity\EntityViewBuilder::addContextualLinks()
File
- src/
Plugin/ entity_embed/ EntityEmbedDisplay/ EntityReferenceFieldFormatter.php, line 187
Class
- EntityReferenceFieldFormatter
- Entity Embed Display reusing entity reference field formatters.
Namespace
Drupal\entity_embed\Plugin\entity_embed\EntityEmbedDisplayCode
public static function disableContextualLinks(array $build) {
unset($build['#contextual_links']);
return $build;
}