function content_type_gorups_entity_insert in Content type groups 7.2
Implements hook_entity_insert().
File
- ./
content_type_groups.controller.inc, line 279 - Contains controllers and entity hooks for the content_type_group entity.
Code
function content_type_gorups_entity_insert($entity, $entity_type) {
if ($entity_type == CONTENT_TYPE_GROUPS_ENTITY_NAME) {
dpm($entity);
/*
// Delete all types for this group
db_delete('content_type_groups_types')
->condition('group_type', $entity->type)
->execute();
// Insert the new types for this group
foreach ($this->content_types as $content_type => $type_data) {
db_insert(self::$table_types)
->fields(array(
'group_type' => $this->type,
'content_type' => $content_type,
'weight' => $type_data['weight'],
))
->execute();
}
// Add the allowed methods to the key-methods permissions table
foreach ($entity->content_types as $content_type) {
db_insert('csm_api_keys_methods')
->fields(array(
'api_key' => $entity->api_key,
'method' => $method,
))
->execute();
}
*/
}
}