예제 #1
0
 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
0
 /**
  * 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);
 }
 /**
  * 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
0
 /**
  */
 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
0
파일: Form.php 프로젝트: ksecor/civicrm
 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
0
 /**
  *
  */
 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
0
 /**
  * 
  */
 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();
 }
 function __construct($participant)
 {
     parent::__construct();
     //XXX
     $this->participant = $participant;
 }
예제 #9
0
파일: Form.php 프로젝트: ksecor/civicrm
 /**
  * 
  */
 function __construct()
 {
     parent::__construct();
 }
예제 #10
0
파일: Form.php 프로젝트: bhirsch/voipdev
 /**
  * 
  */
 function __construct()
 {
     parent::__construct();
     // merge custom data columns to _columns list, if any
     $this->addCustomDataToColumns();
 }