function crm_core_relationship_ui_views_pre_render in CRM Core 8.3
Same name and namespace in other branches
- 8 modules/crm_core_relationship_ui/crm_core_relationship_ui.module \crm_core_relationship_ui_views_pre_render()
- 8.2 modules/crm_core_relationship_ui/crm_core_relationship_ui.module \crm_core_relationship_ui_views_pre_render()
- 7 modules/crm_core_relationship_ui/crm_core_relationship_ui.module \crm_core_relationship_ui_views_pre_render()
Implements hook_views_pre_render().
File
- modules/
crm_core_relationship_ui/ crm_core_relationship_ui.module, line 362 - Relationship UI module hooks.
Code
function crm_core_relationship_ui_views_pre_render(&$view) {
if ($view->name == 'crm_relationships_by_contact') {
// Grabbing 1st view argument to avoid preview problems.
$contact_id = $view->args[0];
$contact = Contact::load($contact_id);
_crm_core_relationships_ui_breadcrmub($contact);
$view->build_info['title'] = t('Relationships for @contact_name', [
'@contact_name' => $contact
->label(),
]);
}
}