You are here

function hook_entity_embed_alter in Entity Embed 7.2

Same name and namespace in other branches
  1. 8 entity_embed.api.php \hook_entity_embed_alter()
  2. 7.3 entity_embed.api.php \hook_entity_embed_alter()
  3. 7 entity_embed.api.php \hook_entity_embed_alter()

Alter the result of entity_view().

This hook is called after the content has been assembled in a structured array and may be used for doing processing which requires that the complete block content structure has been built.

Parameters

array &$build: A renderable array of data, as returned from entity_view().

$entity: The entity object.

array $context: The context array.

1 function implements hook_entity_embed_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

entity_embed_test_entity_embed_alter in tests/entity_embed_test.module
Implements hook_entity_embed_alter().

File

./entity_embed.api.php, line 57
Hooks provided by the entity_embed module.

Code

function hook_entity_embed_alter(&$build, $entity, $context) {

  // Remove the contextual links on all entites that provide them.
  if (isset($build['#contextual_links'])) {
    unset($build['#contextual_links']);
  }
}