function lingotek_rules_entity_has_profile in Lingotek Translation 7.5
Same name and namespace in other branches
- 7.7 lingotek.rules.inc \lingotek_rules_entity_has_profile()
- 7.6 lingotek.rules.inc \lingotek_rules_entity_has_profile()
File
- ./
lingotek.rules.inc, line 211 - 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;
}