function crm_core_relationship_entity_info_alter in CRM Core 8.2
Same name and namespace in other branches
- 8.3 modules/crm_core_relationship_ui/crm_core_relationship_ui.module \crm_core_relationship_entity_info_alter()
- 8 modules/crm_core_relationship_ui/crm_core_relationship_ui.module \crm_core_relationship_entity_info_alter()
- 7 modules/crm_core_relationship_ui/crm_core_relationship_ui.module \crm_core_relationship_entity_info_alter()
Implements hook_entity_info_alter().
File
- modules/
crm_core_relationship_ui/ crm_core_relationship_ui.module, line 171
Code
function crm_core_relationship_entity_info_alter(&$entity_info) {
// we are only altering the admin path for CRM relationship types
foreach (RelationType::loadMultiple() as $type => $info) {
if (crm_core_relationship_is_relationship_type($type)) {
$entity_info['relation']['bundles'][$type]['label'] = $type;
$entity_info['relation']['bundles'][$type]['admin'] = array(
'path' => 'admin/structure/crm-core/relationship-types/manage/%relation_type',
'real path' => 'admin/structure/crm-core/relationship-types/manage/' . $type,
'bundle argument' => 5,
'access callback' => 'crm_core_relationship_access_permissions',
'access arguments' => array(
NULL,
'admin',
),
);
}
}
}