function entity_embed_test_entity_embed_alter in Entity Embed 7.2
Same name and namespace in other branches
- 8 tests/modules/entity_embed_test/entity_embed_test.module \entity_embed_test_entity_embed_alter()
- 7.3 tests/entity_embed_test.module \entity_embed_test_entity_embed_alter()
- 7 tests/entity_embed_test.module \entity_embed_test_entity_embed_alter()
Implements hook_entity_embed_alter().
1 string reference to 'entity_embed_test_entity_embed_alter'
- EntityEmbedHooksTest::testEntityEmbedHooks in ./
entity_embed.test - Tests the hooks provided by entity_embed module.
File
- tests/
entity_embed_test.module, line 28 - Helper module for the entity_embed tests.
Code
function entity_embed_test_entity_embed_alter(&$build, $entity, $context) {
// Allow tests to enable or disable this hook.
if (!variable_get('entity_embed_test_entity_embed_alter', FALSE)) {
return;
}
// Set title of the 'node' entity.
$node = $build['node'][$entity->nid]['#node'];
$node->title = 'Title set by hook_entity_embed_alter';
}