function hook_entity_preembed in Entity Embed 7
Same name and namespace in other branches
- 7.2 entity_embed.api.php \hook_entity_preembed()
Act on an entity before it is about to be rendered in an embed.
Parameters
$entity: The entity object.
array $context: The context array.
File
- ./
entity_embed.api.php, line 35 - Hooks provided by the entity_embed module.
Code
function hook_entity_preembed($entity, $context) {
if (isset($context['overrides']) && is_array($context['overrides'])) {
foreach ($context['overrides'] as $key => $value) {
$entity->key = $value;
}
}
}