og_create_group
- drupal
Drupal 7 og_create_group($values = array())
Callback to create a new OG group.
1 call to og_create_group()
File
- sites/
all/ modules/ og/ og.module, line 1241 - Enable users to create and manage groups with roles and permissions.
Code
function og_create_group($values = array()) {
if ($entity = entity_load($values['entity_type'], array($values['etid']))) {
$entity = current($entity);
// Add default values.
$values += array(
'state' => OG_STATE_ACTIVE,
'created' => time(),
'label' => og_entity_label($values['entity_type'], $entity),
);
return entity_create('group', $values);
}
// Entity couldn't be loaded.
return FALSE;
}

