function rules_entity_view
Same name in other branches
- 8.x-3.x rules.module \rules_entity_view()
Implements hook_entity_view().
Related topics
File
-
modules/
events.inc, line 42
Code
function rules_entity_view($entity, $type, $view_mode, $langcode) {
switch ($type) {
case 'comment':
rules_invoke_event('comment_view--' . $entity->node_type, $entity, $view_mode);
rules_invoke_event('comment_view', $entity, $view_mode);
break;
case 'node':
rules_invoke_event('node_view--' . $entity->type, $entity, $view_mode);
rules_invoke_event('node_view', $entity, $view_mode);
break;
case 'user':
rules_invoke_event('user_view', $entity, $view_mode);
break;
}
}