当前位置: 首页>>代码示例>>PHP>>正文


PHP CRM_Core_Form::__construct方法代码示例

本文整理汇总了PHP中CRM_Core_Form::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_Form::__construct方法的具体用法?PHP CRM_Core_Form::__construct怎么用?PHP CRM_Core_Form::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRM_Core_Form的用法示例。


在下文中一共展示了CRM_Core_Form::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: explode

 function __construct($state = NULL, $action = CRM_Core_Action::NONE, $method = 'post', $name = NULL)
 {
     $this->_config = CRM_Core_Config::singleton();
     // this->latestVersion is legacy code, only used for 2.0 -> 2.1 upgrade
     // latest ver in 2.1 series
     $this->latestVersion = '2.1.6';
     $domain = new CRM_Core_DAO_Domain();
     $domain->find(TRUE);
     $this->multilingual = (bool) $domain->locales;
     $this->locales = explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales);
     $smarty = CRM_Core_Smarty::singleton();
     $smarty->compile_dir = $this->_config->templateCompileDir;
     $smarty->assign('multilingual', $this->multilingual);
     $smarty->assign('locales', $this->locales);
     // we didn't call CRM_Core_BAO_ConfigSetting::retrieve(), so we need to set $dbLocale by hand
     if ($this->multilingual) {
         global $dbLocale;
         $dbLocale = "_{$this->_config->lcMessages}";
     }
     parent::__construct($state, $action, $method, $name);
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:21,代码来源:Form.php

示例2: __construct

 /**
  * Class constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->addClass('crm-report-form');
     if ($this->_tagFilter) {
         $this->buildTagFilter();
     }
     if ($this->_exposeContactID) {
         if (array_key_exists('civicrm_contact', $this->_columns)) {
             $this->_columns['civicrm_contact']['fields']['exposed_id'] = array('name' => 'id', 'title' => 'Contact ID', 'no_repeat' => TRUE);
         }
     }
     if ($this->_groupFilter) {
         $this->buildGroupFilter();
     }
     // Get all custom groups
     $allGroups = CRM_Core_PseudoConstant::get('CRM_Core_DAO_CustomField', 'custom_group_id');
     // Get the custom groupIds for which the user has VIEW permission
     // If the user has 'access all custom data' permission, we'll leave $permCustomGroupIds empty
     // and addCustomDataToColumns() will allow access to all custom groups.
     $permCustomGroupIds = array();
     if (!CRM_Core_Permission::check('access all custom data')) {
         $permCustomGroupIds = CRM_ACL_API::group(CRM_Core_Permission::VIEW, NULL, 'civicrm_custom_group', $allGroups, NULL);
         // do not allow custom data for reports if user doesn't have
         // permission to access custom data.
         if (!empty($this->_customGroupExtends) && empty($permCustomGroupIds)) {
             $this->_customGroupExtends = array();
         }
     }
     // merge custom data columns to _columns list, if any
     $this->addCustomDataToColumns(TRUE, $permCustomGroupIds);
     // add / modify display columns, filters ..etc
     CRM_Utils_Hook::alterReportVar('columns', $this->_columns, $this);
     //assign currencyColumn variable to tpl
     $this->assign('currencyColumn', $this->_currencyColumn);
 }
开发者ID:konadave,项目名称:civicrm-core,代码行数:39,代码来源:Form.php

示例3:

 /**
  * Since we are using same class / code to generate multiple instances 
  * of address block, we need to generate unique form name for each, 
  * hence calling parent contructor
  */
 function __construct()
 {
     $locBlockNo = CRM_Utils_Request::retrieve('locno', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
     $name = "Address_{$locBlockNo}";
     parent::__construct(null, CRM_Core_Action::NONE, 'post', $name);
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:11,代码来源:Address.php

示例4: __construct

 /**
  */
 public function __construct()
 {
     parent::__construct();
     // this property used by civicrm_fb module and if true, forces thank you email to be sent
     // for users signing in via Facebook connect; also sets Fb email to check against
     $this->forceEmailConfirmed['flag'] = FALSE;
     $this->forceEmailConfirmed['email'] = '';
 }
开发者ID:kcristiano,项目名称:civicrm-core,代码行数:10,代码来源:Signature.php

示例5:

 function __construct($state = null, $action = CRM_Core_Action::NONE, $method = 'post', $name = null)
 {
     $this->_config =& CRM_Core_Config::singleton();
     $this->latestVersion = CRM_Utils_System::version();
     parent::__construct($state, $action, $method, $name);
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:6,代码来源:Form.php

示例6: array

 /**
  *
  */
 function __construct()
 {
     parent::__construct();
     // build tag filter
     if ($this->_tagFilter) {
         $this->buildTagFilter();
     }
     if ($this->_exposeContactID) {
         if (array_key_exists('civicrm_contact', $this->_columns)) {
             $this->_columns['civicrm_contact']['fields']['exposed_id'] = array('name' => 'id', 'title' => 'Contact ID', 'no_repeat' => TRUE);
         }
     }
     if ($this->_groupFilter) {
         $this->buildGroupFilter();
     }
     // do not allow custom data for reports if user don't have
     // permission to access custom data.
     if (!empty($this->_customGroupExtends) && !CRM_Core_Permission::check('access all custom data')) {
         $this->_customGroupExtends = array();
     }
     // merge custom data columns to _columns list, if any
     $this->addCustomDataToColumns();
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:26,代码来源:Form.php

示例7: array

 /**
  * 
  */
 function __construct()
 {
     parent::__construct();
     // build tag filter
     if ($this->_tagFilter) {
         $this->buildTagFilter();
     }
     // do not allow custom data for reports if user don't have
     // permission to access custom data.
     if (!empty($this->_customGroupExtends) && !CRM_Core_Permission::check('access all custom data')) {
         $this->_customGroupExtends = array();
     }
     // merge custom data columns to _columns list, if any
     $this->addCustomDataToColumns();
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:18,代码来源:Form.php

示例8:

 function __construct($participant)
 {
     parent::__construct();
     //XXX
     $this->participant = $participant;
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:6,代码来源:MerParticipant.php

示例9:

 /**
  * 
  */
 function __construct()
 {
     parent::__construct();
     // merge custom data columns to _columns list, if any
     $this->addCustomDataToColumns();
 }
开发者ID:bhirsch,项目名称:voipdev,代码行数:9,代码来源:Form.php


注:本文中的CRM_Core_Form::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。