<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
class CRM_Contribute_Form_ContributionPage extends CRM_Core_Form {
/**
- * the page id saved to the session for an update
+ * The page id saved to the session for an update
*
* @var int
- * @access protected
*/
protected $_id;
/**
- * the pledgeBlock id saved to the session for an update
+ * The pledgeBlock id saved to the session for an update
*
* @var int
- * @access protected
*/
protected $_pledgeBlockID;
/**
- * are we in single form mode or wizard mode?
+ * Are we in single form mode or wizard mode?
*
* @var boolean
- * @access protected
*/
protected $_single;
/**
- * is this the first page?
+ * Is this the first page?
*
* @var boolean
- * @access protected
*/
protected $_first = FALSE;
/**
- * store price set id.
+ * Store price set id.
*
* @var int
- * @access protected
*/
protected $_priceSetID = NULL;
protected $_values;
/**
- * Function to set variables up before form is built
+ * Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
// current contribution page id
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->applyFilter('__ALL__', 'trim');
$this->addElement('hidden', 'cancelURL', $this->_cancelURL);
}
-
if ($this->_single) {
$this->addButtons(array(
array(
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return array defaults
*/
- function setDefaultValues() {
+ public function setDefaultValues() {
//some child classes calling setdefaults directly w/o preprocess.
$this->_values = $this->get('values');
if (!is_array($this->_values)) {
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$pageId = $this->get('id');
}
}
- function endPostProcess() {
+ public function endPostProcess() {
// make submit buttons keep the current working tab opened, or save and next tab
if ($this->_action & CRM_Core_Action::UPDATE) {
$className = CRM_Utils_String::getClassName($this->_name);
case 'Contribute':
$attributes = $this->getVar('_attributes');
$subPage = strtolower(basename(CRM_Utils_Array::value('action', $attributes)));
- $subPageName = ucFirst($subPage);
+ $subPageName = ucfirst($subPage);
if ($subPage == 'friend') {
$nextPage = 'custom';
}
* Use the form name to create the tpl file name
*
* @return string
- * @access public
*/
/**
* @return string
*/
- function getTemplateFileName() {
+ public function getTemplateFileName() {
if ($this->controller->getPrint() || $this->getVar('_id') <= 0 ||
($this->_action & CRM_Core_Action::DELETE) ||
(CRM_Utils_String::getClassName($this->_name) == 'AddProduct')
}
}
}
-