function crm_core_contact_handler_field_contact_type::render in CRM Core 7
Render callback.
Overrides views_handler_field::render
File
- modules/
crm_core_contact/ includes/ views/ handlers/ crm_core_contact_handler_field_contact_type.inc, line 48 - Field handler to provide simple renderer that allows linking to a contact.
Class
- crm_core_contact_handler_field_contact_type
- Handler class.
Code
function render($values) {
if ($this->options['link_to_contact_type']) {
$this->options['alter']['make_link'] = TRUE;
$this->options['alter']['path'] = 'admin/structure/crm-core/contact-types/manage/' . $values->{$this->field_alias};
}
$type = $this->options['machine_name'] ? $values->{$this->field_alias} : crm_core_contact_type_get_name($values->{$this->field_alias});
return check_plain($type);
}