function pollim_entity_info_alter in Poll Improved 7
Implements hook_entity_info_alter().
We are adding the info about the pollim types via a hook to avoid a recursion issue as loading the pollim types requires the entity info as well.
@todo This needs to be improved
File
- ./
pollim.module, line 95 - Module for the Pollim Entity - a starting point to create your own Entity and associated administration interface
Code
function pollim_entity_info_alter(&$entity_info) {
foreach (pollim_get_types() as $type => $info) {
$entity_info['pollim']['bundles'][$type] = array(
'label' => $info->label,
'admin' => array(
'path' => 'admin/structure/pollim_types/manage/%pollim_type',
'real path' => 'admin/structure/pollim_types/manage/' . $type,
'bundle argument' => 4,
'access arguments' => array(
'administer pollim types',
),
),
);
}
}