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


PHP CRM_Event_Form_ManageEvent::preProcess方法代码示例

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


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

示例1: preProcess

 /**
  * Set variables up before form is built.
  *
  * @return void
  */
 public function preProcess()
 {
     $this->_addProfileBottom = CRM_Utils_Array::value('addProfileBottom', $_GET, FALSE);
     $this->_profileBottomNum = CRM_Utils_Array::value('addProfileNum', $_GET, 0);
     $this->_addProfileBottomAdd = CRM_Utils_Array::value('addProfileBottomAdd', $_GET, FALSE);
     $this->_profileBottomNumAdd = CRM_Utils_Array::value('addProfileNumAdd', $_GET, 0);
     parent::preProcess();
     $this->assign('addProfileBottom', $this->_addProfileBottom);
     $this->assign('profileBottomNum', $this->_profileBottomNum);
     $urlParams = "id={$this->_id}&addProfileBottom=1&qfKey={$this->controller->_key}";
     $this->assign('addProfileParams', $urlParams);
     if ($addProfileBottom = CRM_Utils_Array::value('custom_post_id_multiple', $_POST)) {
         foreach (array_keys($addProfileBottom) as $profileNum) {
             self::buildMultipleProfileBottom($this, $profileNum);
         }
     }
     $this->assign('addProfileBottomAdd', $this->_addProfileBottomAdd);
     $this->assign('profileBottomNumAdd', $this->_profileBottomNumAdd);
     $urlParamsAdd = "id={$this->_id}&addProfileBottomAdd=1&qfKey={$this->controller->_key}";
     $this->assign('addProfileParamsAdd', $urlParamsAdd);
     if ($addProfileBottomAdd = CRM_Utils_Array::value('additional_custom_post_id_multiple', $_POST)) {
         foreach (array_keys($addProfileBottomAdd) as $profileNum) {
             self::buildMultipleProfileBottom($this, $profileNum, 'additional_', ts('Profile for Additional Participants'));
         }
     }
 }
开发者ID:vakeesan26,项目名称:civicrm-core,代码行数:31,代码来源:Registration.php

示例2: preProcess

 /**
  * Function to set variables up before form is built
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     parent::preProcess();
     $newReminder = CRM_Utils_Request::retrieve('new', 'Boolean', $this, FALSE, FALSE);
     if ($this->_action & CRM_Core_Action::UPDATE && !$newReminder) {
         $field = 'civicrm_event';
         if ($this->_isTemplate) {
             $field = 'event_template';
         }
         $reminderList = CRM_Core_BAO_ActionSchedule::getList(FALSE, $field, $this->_id);
         if ($reminderList && is_array($reminderList)) {
             // Add action links to each of the reminders
             foreach ($reminderList as &$format) {
                 $action = CRM_Core_Action::UPDATE + CRM_Core_Action::DELETE;
                 if ($format['is_active']) {
                     $action += CRM_Core_Action::DISABLE;
                 } else {
                     $action += CRM_Core_Action::ENABLE;
                 }
                 $links = CRM_Admin_Page_ScheduleReminders::links();
                 $links[CRM_Core_Action::DELETE]['qs'] .= "&context=event&eventId={$this->_id}";
                 $links[CRM_Core_Action::UPDATE]['qs'] .= "&context=event&eventId={$this->_id}";
                 $format['action'] = CRM_Core_Action::formLink($links, $action, array('id' => $format['id']), ts('more'), FALSE, 'event.reminder.list', 'Event', $this->_id);
             }
         } else {
             $reminderList = TRUE;
         }
         $this->assign('rows', $reminderList);
         // Update tab "disabled" css class
         $this->ajaxResponse['tabValid'] = !empty($reminderList) && is_array($reminderList);
     }
 }
开发者ID:archcidburnziso,项目名称:civicrm-core,代码行数:38,代码来源:ScheduleReminders.php

示例3: preProcess

 /**
  * Set variables up before form is built.
  *
  * @return void
  */
 public function preProcess()
 {
     parent::preProcess();
     $setTab = CRM_Utils_Request::retrieve('setTab', 'Int', $this, FALSE, 0);
     $mapping = CRM_Utils_Array::first(CRM_Core_BAO_ActionSchedule::getMappings(array('id' => $this->_isTemplate ? CRM_Event_ActionMapping::EVENT_TPL_MAPPING_ID : CRM_Event_ActionMapping::EVENT_NAME_MAPPING_ID)));
     $reminderList = CRM_Core_BAO_ActionSchedule::getList(FALSE, $mapping, $this->_id);
     if ($reminderList && is_array($reminderList)) {
         // Add action links to each of the reminders
         foreach ($reminderList as &$format) {
             $action = CRM_Core_Action::UPDATE + CRM_Core_Action::DELETE;
             if ($format['is_active']) {
                 $action += CRM_Core_Action::DISABLE;
             } else {
                 $action += CRM_Core_Action::ENABLE;
             }
             $scheduleReminder = new CRM_Admin_Page_ScheduleReminders();
             $links = $scheduleReminder->links();
             $links[CRM_Core_Action::DELETE]['qs'] .= "&context=event&compId={$this->_id}";
             $links[CRM_Core_Action::UPDATE]['qs'] .= "&context=event&compId={$this->_id}";
             $format['action'] = CRM_Core_Action::formLink($links, $action, array('id' => $format['id']), ts('more'), FALSE, 'actionSchedule.manage.action', 'ActionSchedule', $this->_id);
         }
     }
     $this->assign('rows', $reminderList);
     $this->assign('setTab', $setTab);
     $this->assign('component', 'event');
     // Update tab "disabled" css class
     $this->ajaxResponse['tabValid'] = is_array($reminderList) && count($reminderList) > 0;
     $this->setPageTitle(ts('Scheduled Reminder'));
 }
开发者ID:nielosz,项目名称:civicrm-core,代码行数:34,代码来源:ScheduleReminders.php

示例4: preProcess

 /** 
  * Function to set variables up before form is built 
  *                                                           
  * @return void 
  * @access public 
  */
 function preProcess()
 {
     //custom data related code
     $this->_cdType = CRM_Utils_Array::value('type', $_GET);
     $this->assign('cdType', false);
     if ($this->_cdType) {
         $this->assign('cdType', true);
         return CRM_Custom_Form_CustomData::preProcess($this);
     }
     parent::preProcess();
     if ($this->_id) {
         $this->assign('entityID', $this->_id);
         $eventType = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $this->_id, 'event_type_id');
     } else {
         $eventType = 'null';
     }
     $showLocation = false;
     // when custom data is included in this page
     if (CRM_Utils_Array::value("hidden_custom", $_POST)) {
         $this->set('type', 'Event');
         $this->set('subType', CRM_Utils_Array::value('event_type_id', $_POST));
         $this->set('entityId', $this->_id);
         CRM_Custom_Form_Customdata::preProcess($this);
         CRM_Custom_Form_Customdata::buildQuickForm($this);
         CRM_Custom_Form_Customdata::setDefaultValues($this);
     }
 }
开发者ID:bhirsch,项目名称:voipdev,代码行数:33,代码来源:EventInfo.php

示例5: preProcess

 /**
  * Set variables up before form is built.
  *
  * @return void
  */
 public function preProcess()
 {
     $this->_addProfileBottom = CRM_Utils_Array::value('addProfileBottom', $_GET, FALSE);
     $this->_profileBottomNum = CRM_Utils_Array::value('addProfileNum', $_GET, 0);
     $this->_addProfileBottomAdd = CRM_Utils_Array::value('addProfileBottomAdd', $_GET, FALSE);
     $this->_profileBottomNumAdd = CRM_Utils_Array::value('addProfileNumAdd', $_GET, 0);
     parent::preProcess();
     $this->assign('addProfileBottom', $this->_addProfileBottom);
     $this->assign('profileBottomNum', $this->_profileBottomNum);
     $urlParams = "id={$this->_id}&addProfileBottom=1&qfKey={$this->controller->_key}";
     $this->assign('addProfileParams', $urlParams);
     if ($addProfileBottom = CRM_Utils_Array::value('custom_post_id_multiple', $_POST)) {
         foreach (array_keys($addProfileBottom) as $profileNum) {
             self::buildMultipleProfileBottom($this, $profileNum);
         }
     }
     $this->assign('perm', 0);
     $ufGroups = CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFField', 'uf_group_id');
     $ufCreate = CRM_ACL_API::group(CRM_Core_Permission::CREATE, NULL, 'civicrm_uf_group', $ufGroups);
     $ufEdit = CRM_ACL_API::group(CRM_Core_Permission::EDIT, NULL, 'civicrm_uf_group', $ufGroups);
     $checkPermission = array(array('administer CiviCRM', 'manage event profiles'));
     if (CRM_Core_Permission::check($checkPermission) || !empty($ufCreate) || !empty($ufEdit)) {
         $this->assign('perm', 1);
     }
     $this->assign('addProfileBottomAdd', $this->_addProfileBottomAdd);
     $this->assign('profileBottomNumAdd', $this->_profileBottomNumAdd);
     $urlParamsAdd = "id={$this->_id}&addProfileBottomAdd=1&qfKey={$this->controller->_key}";
     $this->assign('addProfileParamsAdd', $urlParamsAdd);
     if ($addProfileBottomAdd = CRM_Utils_Array::value('additional_custom_post_id_multiple', $_POST)) {
         foreach (array_keys($addProfileBottomAdd) as $profileNum) {
             self::buildMultipleProfileBottom($this, $profileNum, 'additional_', ts('Profile for Additional Participants'));
         }
     }
 }
开发者ID:rajeshrhino,项目名称:civicrm-core,代码行数:39,代码来源:Registration.php

示例6: preProcess

 /**
  * Function to set variables up before form is built
  *
  * @access public
  */
 public function preProcess()
 {
     parent::preProcess();
     $unmet = CRM_Volunteer_Upgrader::checkExtensionDependencies();
     if (in_array('com.ginkgostreet.multiform', $unmet)) {
         $msg = CRM_Volunteer_Upgrader::getUnmetDependencyErrorMessage('com.ginkgostreet.multiform');
         $this->assign('msg', $msg);
     }
     $this->assign('isModulePermissionSupported', CRM_Core_Config::singleton()->userPermissionClass->isModulePermissionSupported());
 }
开发者ID:relldoesphp,项目名称:civivolunteer,代码行数:15,代码来源:Volunteer.php

示例7: preProcess

 /**
  * Set variables up before form is built.
  *
  * @return void
  */
 public function preProcess()
 {
     parent::preProcess();
     if ($this->_isTemplate) {
         $this->_title = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $this->_id, 'template_title');
     } else {
         $this->_title = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $this->_id, 'title');
     }
     if (!CRM_Event_BAO_Event::checkPermission($this->_id, CRM_Core_Permission::DELETE)) {
         CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
     }
 }
开发者ID:agloa,项目名称:tournament,代码行数:17,代码来源:Delete.php

示例8: preProcess

 /**
  * Function to set variables up before form is built
  *
  * @return void
  * @access public
  */
 public function preProcess()
 {
     parent::preProcess();
     //check for delete
     if (!CRM_Core_Permission::checkActionPermission('CiviEvent', $this->_action)) {
         CRM_Core_Error::fatal(ts('You do not have permission to access this page'));
     }
     if ($this->_isTemplate) {
         $this->_title = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $this->_id, 'template_title');
     } else {
         $this->_title = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $this->_id, 'title');
     }
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:19,代码来源:Delete.php

示例9: preProcess

 /**
  * Function to set variables up before form is built
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     parent::preProcess();
     $this->_values = $this->get('values');
     if ($this->_id && empty($this->_values)) {
         //get location values.
         $params = array('entity_id' => $this->_id, 'entity_table' => 'civicrm_event');
         $this->_values = CRM_Core_BAO_Location::getValues($params);
         //get event values.
         $params = array('id' => $this->_id);
         CRM_Event_BAO_Event::retrieve($params, $this->_values);
         $this->set('values', $this->_values);
     }
     //location blocks.
     CRM_Contact_Form_Location::preProcess($this);
 }
开发者ID:prashantgajare,项目名称:civicrm-core,代码行数:22,代码来源:Location.php

示例10: preProcess

 /**
  * Set variables up before form is built.
  */
 public function preProcess()
 {
     parent::preProcess();
     if ($this->_id) {
         $this->assign('entityID', $this->_id);
         $eventType = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $this->_id, 'event_type_id');
     } else {
         $eventType = 'null';
     }
     $showLocation = FALSE;
     // when custom data is included in this page
     if (!empty($_POST['hidden_custom'])) {
         $this->set('type', 'Event');
         $this->set('subType', CRM_Utils_Array::value('event_type_id', $_POST));
         $this->set('entityId', $this->_id);
         CRM_Custom_Form_CustomData::preProcess($this, NULL, $this->_eventType, 1, 'Event', $this->_id);
         CRM_Custom_Form_CustomData::buildQuickForm($this);
         CRM_Custom_Form_CustomData::setDefaultValues($this);
     }
 }
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:23,代码来源:EventInfo.php

示例11: preProcess

 public function preProcess()
 {
     parent::preProcess();
     $this->assign('currentEventId', $this->_id);
     $checkParentExistsForThisId = CRM_Core_BAO_RecurringEntity::getParentFor($this->_id, 'civicrm_event');
     //If this ID has parent, send parent id
     if ($checkParentExistsForThisId) {
         /**
          * Get connected event information list
          */
         //Get all connected event ids
         $allEventIdsArray = CRM_Core_BAO_RecurringEntity::getEntitiesForParent($checkParentExistsForThisId, 'civicrm_event');
         $allEventIds = array();
         if (!empty($allEventIdsArray)) {
             foreach ($allEventIdsArray as $key => $val) {
                 $allEventIds[] = $val['id'];
             }
             if (!empty($allEventIds)) {
                 $params = array();
                 $query = "\n            SELECT *\n            FROM civicrm_event\n            WHERE id IN (" . implode(",", $allEventIds) . ")\n            ORDER BY start_date asc\n             ";
                 $dao = CRM_Core_DAO::executeQuery($query, $params, TRUE, 'CRM_Event_DAO_Event');
                 $permissions = CRM_Event_BAO_Event::checkPermission();
                 while ($dao->fetch()) {
                     if (in_array($dao->id, $permissions[CRM_Core_Permission::VIEW])) {
                         $manageEvent[$dao->id] = array();
                         CRM_Core_DAO::storeValues($dao, $manageEvent[$dao->id]);
                     }
                 }
             }
             $this->assign('rows', $manageEvent);
         }
     }
     $parentEventParams = array('id' => $this->_id);
     $parentEventValues = array();
     $parentEventReturnProperties = array('start_date', 'end_date');
     $parentEventAttributes = CRM_Core_DAO::commonRetrieve('CRM_Event_DAO_Event', $parentEventParams, $parentEventValues, $parentEventReturnProperties);
     $this->_parentEventStartDate = $parentEventAttributes->start_date;
     $this->_parentEventEndDate = $parentEventAttributes->end_date;
 }
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:39,代码来源:Repeat.php

示例12: preProcess

 /**
  * Function to set variables up before form is built
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     parent::preProcess();
     $newReminder = CRM_Utils_Request::retrieve('new', 'Boolean', $this, FALSE, FALSE);
     if ($this->_action & CRM_Core_Action::UPDATE && !$newReminder) {
         $reminderList = CRM_Core_BAO_ActionSchedule::getList(FALSE, 'civicrm_event', $this->_id);
         if (is_array($reminderList)) {
             // Add action links to each of the reminders
             foreach ($reminderList as &$format) {
                 $action = CRM_Core_Action::UPDATE + CRM_Core_Action::DELETE;
                 if ($format['is_active']) {
                     $action += CRM_Core_Action::DISABLE;
                 } else {
                     $action += CRM_Core_Action::ENABLE;
                 }
                 $links = CRM_Admin_Page_ScheduleReminders::links();
                 $links[CRM_Core_Action::DELETE]['qs'] .= "&context=event&eventId={$this->_id}";
                 $links[CRM_Core_Action::UPDATE]['qs'] .= "&context=event&eventId={$this->_id}";
                 $format['action'] = CRM_Core_Action::formLink($links, $action, array('id' => $format['id']));
             }
             $this->assign('rows', $reminderList);
         }
     }
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:30,代码来源:ScheduleReminders.php

示例13: preProcess

 /**
  * Set variables up before form is built.
  */
 public function preProcess()
 {
     parent::preProcess();
 }
开发者ID:saurabhbatra96,项目名称:civicrm-core,代码行数:7,代码来源:Fee.php

示例14: preProcess

 /**
  * Set variables up before form is built.
  *
  * @return void
  */
 public function preProcess()
 {
     CRM_Core_Resources::singleton()->addStyleFile('org.civicrm.webtracking', 'css/web-tracking-form.css');
     parent::preProcess();
 }
开发者ID:VishalAgarwal,项目名称:org.civicrm.webtracking,代码行数:10,代码来源:Event.php

示例15: preProcess

 /**
  * set variables up before form is built
  *
  * @access public
  */
 public function preProcess()
 {
     parent::preProcess();
     /*// Retrieve the profile IDs associated with the project; if none exist,
       // create a dummy using CiviVolunteer's built-in profile. Note: this is
       // necessary to ensure backwards compatibility with versions pre-dating the
       // profile selection widget.
       // Prior to php 5.5 you must store to a var before testing for empty
       // http://joomla.stackexchange.com/questions/5565/fatal-error-cant-use-method-return-value-in-write-context
       // hence re-instating the extra line of code
       $profileIDs = $this->getProfileIDS();
       if (empty($profileIDS)) {
         $this->_profile_ids[] = civicrm_api3('UFGroup', 'getvalue', array(
           'name' => 'volunteer_sign_up',
           'return' => 'id',
         ));
       }*/
 }
开发者ID:adam-edison,项目名称:org.civicrm.volunteer,代码行数:23,代码来源:Volunteer.php


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