本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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'] = '';
}
示例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);
}
示例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();
}
示例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();
}
示例8:
function __construct($participant)
{
parent::__construct();
//XXX
$this->participant = $participant;
}
示例9:
/**
*
*/
function __construct()
{
parent::__construct();
// merge custom data columns to _columns list, if any
$this->addCustomDataToColumns();
}