當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CRM_Core_Page::__construct方法代碼示例

本文整理匯總了PHP中CRM_Core_Page::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRM_Core_Page::__construct方法的具體用法?PHP CRM_Core_Page::__construct怎麽用?PHP CRM_Core_Page::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CRM_Core_Page的用法示例。


在下文中一共展示了CRM_Core_Page::__construct方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

 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;
             }
         }
     }
 }
開發者ID:ksecor,項目名稱:civicrm,代碼行數:25,代碼來源:UserDashBoard.php

示例2: __construct

 /**
  * @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';
 }
開發者ID:nganivet,項目名稱:civicrm-core,代碼行數:15,代碼來源:Main.php

示例3: elseif

 /**
  * @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;
         }
     }
 }
開發者ID:eruraindil,項目名稱:uk.co.vedaconsulting.pcpteams,代碼行數:20,代碼來源:Dashboard.php

示例4: __construct

 /**
  * 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);
 }
開發者ID:nielosz,項目名稱:civicrm-core,代碼行數:14,代碼來源:Basic.php

示例5: __construct

 /**
  * 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);
 }
開發者ID:sarehag,項目名稱:civicrm-core,代碼行數:54,代碼來源:Dynamic.php

示例6: __construct

 /**
  * class constructor
  *
  * @return CRM_Contact_Page_View_CustomData
  */
 public function __construct()
 {
     parent::__construct();
 }
開發者ID:peteainsworth,項目名稱:civicrm-4.2.9-drupal,代碼行數:9,代碼來源:CustomData.php

示例7:

 /**
  * 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();
 }
開發者ID:ksecor,項目名稱:civicrm,代碼行數:17,代碼來源:Dynamic.php

示例8: array

 /**
  * 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();
 }
開發者ID:hampelm,項目名稱:Ginsberg-CiviDemo,代碼行數:22,代碼來源:Dynamic.php

示例9:

 /**
  * 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);
 }
開發者ID:bhirsch,項目名稱:voipdev,代碼行數:12,代碼來源:Basic.php

示例10: __construct

 /**
  * @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');
 }
開發者ID:kidaa30,項目名稱:yes,代碼行數:14,代碼來源:Main.php

示例11: array

 /**
  * 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);
 }
開發者ID:peteainsworth,項目名稱:civicrm-4.2.9-drupal,代碼行數:30,代碼來源:Dynamic.php


注:本文中的CRM_Core_Page::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。