function eck_entity_view_alter in Entity Construction Kit (ECK) 8
Same name and namespace in other branches
- 7.3 eck.module \eck_entity_view_alter()
- 7.2 eck.module \eck_entity_view_alter()
Implements hook_entity_view_alter().
File
- ./
eck.module, line 233 - Contains hook implementations.
Code
function eck_entity_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) {
if ($entity instanceof EckEntity) {
// Generalize the entity-type-specific defaults for easier default theming.
$build['#theme'] = 'eck_entity';
$build['#eck_entity'] = $entity;
}
}