<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
class CRM_Event_Form_Task_PickProfile extends CRM_Event_Form_Task {
/**
- * the title of the group
+ * The title of the group
*
* @var string
*/
protected $_title;
/**
- * maximum event participations that should be allowed to update
- *
+ * Maximum event participations that should be allowed to update
*/
protected $_maxParticipations = 100;
/**
- * variable to store redirect path
- *
+ * Variable to store redirect path
*/
protected $_userContext;
/**
- * build all the data structures needed to build the form
+ * Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
- function preProcess() {
- /*
- * initialize the task and row fields
- */
+ public function preProcess() {
+ // initialize the task and row fields
parent::preProcess();
$session = CRM_Core_Session::singleton();
}
/**
- * Build the form
+ * Build the form object
*
- * @access public
*
* @return void
*/
- function buildQuickForm() {
+ public function buildQuickForm() {
$types = array('Participant');
$profiles = CRM_Core_BAO_UFGroup::getProfiles($types, TRUE);
array(
'' => ts('- select profile -')) + $profiles, TRUE
);
- $this->addDefaultButtons(ts('Continue >>'));
+ $this->addDefaultButtons(ts('Continue'));
}
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
- function addRules() {
+ public function addRules() {
$this->addFormRule(array('CRM_Event_Form_Task_PickProfile', 'formRule'));
}
/**
- * global validation rules for the form
+ * Global validation rules for the form
*
- * @param array $fields posted values of the form
+ * @param array $fields
+ * Posted values of the form.
*
- * @return array list of errors to be posted back to the form
+ * @return array
+ * list of errors to be posted back to the form
* @static
- * @access public
*/
- static function formRule($fields) {
+ public static function formRule($fields) {
return TRUE;
}
/**
- * process the form after the input has been submitted and validated
+ * Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
// also reset the batch page so it gets new values from the db
$this->controller->resetPage('Batch');
}
- //end of function
}
-