function __construct() { parent::__construct(); $check = CRM_Core_Permission::check('access Contact Dashboard'); if (!$check) { CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/dashboard', 'reset=1')); break; } $this->_contactId = CRM_Utils_Request::retrieve('id', 'Positive', $this); $session =& CRM_Core_Session::singleton(); $userID = $session->get('userID'); if (!$this->_contactId) { $this->_contactId = $userID; } else { if ($this->_contactId != $userID) { require_once 'CRM/Contact/BAO/Contact/Permission.php'; if (!CRM_Contact_BAO_Contact_Permission::allow($this->_contactId, CRM_Core_Permission::VIEW)) { CRM_Core_Error::fatal(ts('You do not have permission to view this contact')); } if (!CRM_Contact_BAO_Contact_Permission::allow($this->_contactId, CRM_Core_Permission::EDIT)) { $this->_edit = false; } } } }
/** * @param string $title * Title of the page. * @param int $mode * Mode of the page. * @param \CRM_Core_Resources|null $res * Resource manager. */ public function __construct($title = NULL, $mode = NULL, $res = NULL) { parent::__construct($title, $mode); $this->res = \CRM_Core_Resources::singleton(); $this->angular = \Civi\Core\Container::singleton()->get('angular'); $this->region = \CRM_Utils_Request::retrieve('snippet', 'String') ? 'ajax-snippet' : 'html-header'; }
/** * @throws Exception */ function __construct() { parent::__construct(); $this->_contactId = CRM_Utils_Request::retrieve('id', 'Positive', $this); $session = CRM_Core_Session::singleton(); $userID = $session->get('userID'); if (!$this->_contactId) { $this->_contactId = $userID; } elseif ($this->_contactId != $userID) { if (!CRM_Contact_BAO_Contact_Permission::allow($this->_contactId, CRM_Core_Permission::VIEW)) { CRM_Core_Error::fatal(ts('You do not have permission to view this contact')); } if (!CRM_Contact_BAO_Contact_Permission::allow($this->_contactId, CRM_Core_Permission::EDIT)) { $this->_edit = FALSE; } } }
/** * Class constructor. * * @param string $title * Title of the page. * @param int $mode * Mode of the page. * * @return \CRM_Core_Page_Basic */ public function __construct($title = NULL, $mode = NULL) { parent::__construct($title, $mode); }
/** * Class constructor. * * @param int $id * The contact id. * @param int $gid * The group id. * * @param $restrict * @param bool $skipPermission * @param null $profileIds * * @return \CRM_Profile_Page_Dynamic */ public function __construct($id, $gid, $restrict, $skipPermission = FALSE, $profileIds = NULL) { parent::__construct(); $this->_id = $id; $this->_gid = $gid; $this->_restrict = $restrict; $this->_skipPermission = $skipPermission; if (!array_key_exists('multiRecord', $_GET)) { $this->set('multiRecord', NULL); } if (!array_key_exists('recordId', $_GET)) { $this->set('recordId', NULL); } if (!array_key_exists('allFields', $_GET)) { $this->set('allFields', NULL); } //specifies the action being done on a multi record field $multiRecordAction = CRM_Utils_Request::retrieve('multiRecord', 'String', $this); $this->_multiRecord = !is_numeric($multiRecordAction) ? CRM_Core_Action::resolve($multiRecordAction) : $multiRecordAction; if ($this->_multiRecord) { $this->set('multiRecord', $this->_multiRecord); } if ($this->_multiRecord & CRM_Core_Action::VIEW) { $this->_recordId = CRM_Utils_Request::retrieve('recordId', 'Positive', $this); $this->_allFields = CRM_Utils_Request::retrieve('allFields', 'Integer', $this); } if ($profileIds) { $this->_profileIds = $profileIds; } else { $this->_profileIds = array($gid); } $this->_activityId = CRM_Utils_Request::retrieve('aid', 'Positive', $this, FALSE, 0, 'GET'); if (is_numeric($this->_activityId)) { $latestRevisionId = CRM_Activity_BAO_Activity::getLatestActivityId($this->_activityId); if ($latestRevisionId) { $this->_activityId = $latestRevisionId; } } $this->_isContactActivityProfile = CRM_Core_BAO_UFField::checkContactActivityProfileType($this->_gid); }
/** * class constructor * * @return CRM_Contact_Page_View_CustomData */ public function __construct() { parent::__construct(); }
/** * class constructor * * @param int $id the contact id * @param int $gid the group id * * @return void * @access public */ function __construct($id, $gid, $restrict, $skipPermission = false) { $this->_id = $id; $this->_gid = $gid; $this->_restrict = $restrict; $this->_skipPermission = $skipPermission; parent::__construct(); }
/** * class constructor * * @param int $id the contact id * @param int $gid the group id * * @return void * @access public */ function __construct($id, $gid, $restrict, $skipPermission = false, $profileIds = null) { $this->_id = $id; $this->_gid = $gid; $this->_restrict = $restrict; $this->_skipPermission = $skipPermission; if ($profileIds) { $this->_profileIds = $profileIds; } else { $this->_profileIds = array($gid); } parent::__construct(); }
/** * class constructor * * @param string $title title of the page * @param int $mode mode of the page * * @return CRM_Core_Page */ function __construct($title = null, $mode = null) { parent::__construct($title, $mode); }
/** * @param string $title * Title of the page. * @param int $mode * Mode of the page. * @param \CRM_Core_Resources|null $res * Resource manager. */ public function __construct($title = NULL, $mode = NULL, $res = NULL) { parent::__construct($title, $mode); $this->res = \CRM_Core_Resources::singleton(); $this->angular = \Civi\Core\Container::singleton()->get('angular'); }
/** * class constructor * * @param int $id the contact id * @param int $gid the group id * * @return void * @access public */ function __construct($id, $gid, $restrict, $skipPermission = FALSE, $profileIds = NULL) { parent::__construct(); $this->_id = $id; $this->_gid = $gid; $this->_restrict = $restrict; $this->_skipPermission = $skipPermission; if ($profileIds) { $this->_profileIds = $profileIds; } else { $this->_profileIds = array($gid); } $this->_activityId = CRM_Utils_Request::retrieve('aid', 'Positive', $this, FALSE, 0, 'GET'); if (is_numeric($this->_activityId)) { $latestRevisionId = CRM_Activity_BAO_Activity::getLatestActivityId($this->_activityId); if ($latestRevisionId) { $this->_activityId = $latestRevisionId; } } $this->_isContactActivityProfile = CRM_Core_BAO_UFField::checkContactActivityProfileType($this->_gid); }