You are here

function context_entity_field_entity_view in Context entity field 7

Implements of hook_entity_view().

File

./context_entity_field.module, line 66
Adds entity field value as context condiction

Code

function context_entity_field_entity_view($entity, $type, $view_mode, $langcode) {
  if ($plugin = context_get_plugin('condition', 'entity_field')) {
    $plugin
      ->execute($type, $entity);
  }
  if ($plugin = context_get_plugin('condition', 'entity_view_mode')) {
    $plugin
      ->execute($type, $view_mode);
  }
}