function crm_core_contact_handler_field_contact::render_link in CRM Core 7
Render whatever the data is as a link to the contact.
Data should be made XSS safe prior to calling this function.
1 call to crm_core_contact_handler_field_contact::render_link()
- crm_core_contact_handler_field_contact::render in modules/
crm_core_contact/ includes/ views/ handlers/ crm_core_contact_handler_field_contact.inc - Render the field.
File
- modules/
crm_core_contact/ includes/ views/ handlers/ crm_core_contact_handler_field_contact.inc, line 43
Class
- crm_core_contact_handler_field_contact
- Field handler to provide simple renderer that allows linking to a contact.
Code
function render_link($data, $values) {
if (!empty($this->options['link_to_contact']) && $data !== NULL && $data !== '') {
$this->options['alter']['make_link'] = TRUE;
$this->options['alter']['path'] = 'crm-core/contact/' . $values->{$this->aliases['contact_id']};
}
return $data;
}