/**
* This function process contribution related objects.
+ *
+ * @param integer $contributionId
+ * @param integer $statusId
+ * @param integer|null $previousStatusId
+ *
+ * @return null|string
*/
protected function updateRelatedComponent($contributionId, $statusId, $previousStatusId = NULL) {
$statusMsg = NULL;
);
// this required to show billing block
+ // @todo remove this assignment the billing block is now designed to be always included but will not show fieldsets unless those sets of fields are assigned
$this->assign_by_ref('paymentProcessor', $paymentProcessor);
}
/**
* Create the recurring contribution record
*
+ * @param CRM_Core_Form $form
+ * @param array $params
+ * @param integer $contactID
+ * @param string $contributionType
+ * @param bool $online
+ *
+ * @return mixed
*/
static function processRecurringContribution(&$form, &$params, $contactID, $contributionType, $online = TRUE) {
// return if this page is not set for recurring
}
}
+ /**
+ * @param array $params
+ *
+ * @throws CiviCRM_API3_Exception
+ */
static function submit($params) {
$form = new CRM_Contribute_Form_Contribution_Confirm();
$form->_id = $params['id'];
// to process Custom data that are appended to URL
$getDefaults = CRM_Core_BAO_CustomGroup::extractGetParams($this, "'Contact', 'Individual', 'Contribution'");
- if (!empty($getDefaults)) {
- $this->_defaults = array_merge($this->_defaults, $getDefaults);
- }
+ $this->_defaults = array_merge($this->_defaults, $getDefaults);
$config = CRM_Core_Config::singleton();
// set default country from config if no country set
* build elements to collect information for recurring contributions
*
* @access public
+ *
+ * @param CRM_Core_Form $form
*/
public static function buildRecur(&$form) {
$attributes = CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_ContributionRecur');
/**
* Handle Payment Processor switching
* For contribution and event registration forms
+ * @param CRM_Core_Form $form
+ * @param bool $noFees
*/
static function preProcessPaymentOptions(&$form, $noFees = FALSE) {
$form->_snippet = CRM_Utils_Array::value('snippet', $_GET);
elseif ($chartKey == 'by_year') {
if (!empty($config->fiscalYearStart) && ($config->fiscalYearStart['M'] != 1 || $config->fiscalYearStart['d'] != 1)) {
$startDate = date('Ymd', mktime(0, 0, 0, $config->fiscalYearStart['M'], $config->fiscalYearStart['d'], substr($index,0,4)));
- $endDate = date('Ymd', mktime(0, 0, 0, $config->fiscalYearStart['M'], $config->fiscalYearStart['d'], substr($index,0,4)+1));
+ $endDate = date('Ymd', mktime(0, 0, 0, $config->fiscalYearStart['M'], $config->fiscalYearStart['d'], (substr($index,0,4)) + 1));
}
else {
$startDate = CRM_Utils_Date::format(array('Y' => substr($index,0,4)));
*
* @access public
*
- * @return void
+ * @return array defaults
*/
function setDefaultValues() {
//some child classes calling setdefaults directly w/o preprocess.
*
* @access public
*
- * @return void
+ * @return array
*/
function setDefaultValues() {
$defaults = parent::setDefaultValues();
}
// If Contribution amount section is enabled, then
- // Allow other amounts must be enabeld OR the Fixed Contribution
+ // Allow other amounts must be enabled OR the Fixed Contribution
// Contribution options must contain at least one set of values.
if (!empty($fields['amount_block_is_active'])) {
if (empty($fields['is_allow_other_amount']) &&
/**
* Function used to set defaults for soft credit block
+ *
+ * @param $defaults
+ * @param $form
*/
static function setDefaultValues(&$defaults, &$form) {
//Used to hide/unhide PCP and/or Soft-credit Panes
*
* return $fileName of file which is in pdf format
*
+ * @return string
*/
static public function putFile($html) {
require_once("packages/dompdf/dompdf_config.inc.php");
* @param CRM_Core_Form $form the form object
* @param string $type the type of custom group we are using
*
- * @return void
+ * @return array
* @access public
* @static
*/
static function extractGetParams(&$form, $type) {
- // if not GET params return
if (empty($_GET)) {
- return;
+ return array();
}
$groupTree = CRM_Core_BAO_CustomGroup::getTree($type, $form);
*
* @param null $domainID
*
- * @return object The data if present in the setting table, else null
+ * @return mixed The data if present in the setting table, else null
* @static
* @access public
*/
*
* @param string $name name of the variable to be retrieved
* @param string $type type of the variable (see CRM_Utils_Type for details)
- * @param stdClass $store session scope where variable is stored
+ * @param object $store session scope where variable is stored
* @param bool $abort is this variable required
* @param mixed $default default value of the variable if not present
* @param string $method where should we look for the variable