You are here

function lingotek_rules_entity_has_profile in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.5 lingotek.rules.inc \lingotek_rules_entity_has_profile()
  2. 7.6 lingotek.rules.inc \lingotek_rules_entity_has_profile()

File

./lingotek.rules.inc, line 236
Lingotek Module + Rules Module Integration

Code

function lingotek_rules_entity_has_profile($wrapper, $profile) {
  $entity = $wrapper
    ->value();

  // $wrapper is a DrupalEntityWrapper object
  $entity_profile_id = isset($entity->lingotek['profile']) ? $entity->lingotek['profile'] : "NONE";
  return $entity_profile_id === $profile;
}