function party_activity_entity_info_alter in Party 7
Same name and namespace in other branches
- 8.2 modules/party_activity/party_activity.module \party_activity_entity_info_alter()
Implements hook_entity_info_alter().
File
- modules/
party_activity/ party_activity.module, line 66 - Functions and important hooks for the party_activity module
Code
function party_activity_entity_info_alter(&$entity_info) {
$types = db_select('party_activity_type', 'at')
->fields('at', array(
'type',
'label',
))
->execute()
->fetchAllKeyed();
foreach ($types as $type => $label) {
$entity_info['party_activity']['bundles'][$type] = array(
'label' => $label,
'admin' => array(
'path' => 'admin/structure/activity_types/manage/%party_activity_type',
'real path' => 'admin/structure/activity_types/manage/' . $type,
'bundle argument' => 4,
'access arguments' => array(
'administer activity types',
),
),
);
}
}