当前位置: 首页>>代码示例>>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;未经允许,请勿转载。