3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
19 * Page to display contact information on top of summary.
21 class CRM_Contact_Page_Inline_ContactInfo
extends CRM_Core_Page
{
26 * This method is called after the page is created.
28 public function run() {
29 // get the emails for this contact
30 $contactId = CRM_Utils_Request
::retrieve('cid', 'Positive', CRM_Core_DAO
::$_nullObject, TRUE);
32 $params = ['id' => $contactId];
35 CRM_Contact_BAO_Contact
::getValues($params, $defaults);
37 //get the current employer name
38 if (CRM_Utils_Array
::value('contact_type', $defaults) == 'Individual') {
39 if (!empty($defaults['employer_id']) && !empty($defaults['organization_name'])) {
40 $defaults['current_employer'] = $defaults['organization_name'];
41 $defaults['current_employer_id'] = $defaults['employer_id'];
45 $this->assign('contactId', $contactId);
46 $this->assign($defaults);
48 // check logged in user permission
49 CRM_Contact_Page_View
::checkUserPermission($this, $contactId);
51 // finally call parent