$contactId); $defaults = array(); CRM_Contact_BAO_Contact::getValues($params, $defaults); if (!empty($defaults['gender_id'])) { $gender = CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id'); $defaults['gender_display'] = $gender[CRM_Utils_Array::value('gender_id', $defaults)]; } $this->assignFieldMetadataToTemplate('Contact'); $this->assign('contactId', $contactId); $this->assign($defaults); // check logged in user permission CRM_Contact_Page_View::checkUserPermission($this, $contactId); // finally call parent parent::run(); } }