function og_rules_add_entity_to_group in Organic groups 7.2
Same name and namespace in other branches
- 7 og.rules.inc \og_rules_add_entity_to_group()
Action: Add entity to group.
1 string reference to 'og_rules_add_entity_to_group'
- og_rules_action_info in ./og.rules.inc 
- Implements hook_rules_action_info().
File
- ./og.rules.inc, line 353 
- Rules integration for the Organic groups module.
Code
function og_rules_add_entity_to_group(EntityDrupalWrapper $entity, EntityDrupalWrapper $group) {
  // TODO: Add field-name.
  $values = array(
    'entity_type' => $entity
      ->type(),
    'entity' => $entity
      ->value(),
  );
  og_group($group
    ->type(), $group
    ->getIdentifier(), $values);
}