You are here

function lingotek_rules_entity_change_profile in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lingotek.rules.inc \lingotek_rules_entity_change_profile()
  2. 7.6 lingotek.rules.inc \lingotek_rules_entity_change_profile()
1 string reference to 'lingotek_rules_entity_change_profile'
lingotek_rules_action_info in ./lingotek.rules.inc
Implements hook_rules_action_info().

File

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

Code

function lingotek_rules_entity_change_profile($wrapper, $profile, $settings, $state) {
  $entity_type = $wrapper
    ->type();
  $id = $wrapper
    ->getIdentifier();
  $entity = $wrapper
    ->value();
  $entity->lingotek['profile'] = $profile;
  lingotek_entity_save($entity, $entity_type);
}