public $_online = FALSE;
/**
- * Stores all product option
+ * Stores all product options.
*
* @var array
*/
CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
}
- //@todo - if anyone ever figures out what this _cdType subroutine is about (or even if it still applies) please
- // add comments
+ // @todo - if anyone ever figures out what this _cdType subroutine is about
+ // (or even if it still applies) please add comments!!!!!!!!!!
$this->_cdType = CRM_Utils_Array::value('type', $_GET);
$this->assign('cdType', FALSE);
if ($this->_cdType) {
}
$this->_values = array();
- // current contribution id
+ // Current contribution id.
if ($this->_id) {
$this->assignPremiumProduct($this->_id);
$this->buildValuesAndAssignOnline_Note_Type($this->_id, $this->_values);
*/
public function setDefaultValues() {
if ($this->_cdType) {
+ // @todo document when this function would be called in this way
+ // (and whether it is valid or an overloading of this form).
return CRM_Custom_Form_CustomData::setDefaultValues($this);
}
$defaults = $this->_values;
- //set defaults for pledge payment.
+ // Set defaults for pledge payment.
if ($this->_ppID) {
$defaults['total_amount'] = CRM_Utils_Array::value('scheduled_amount', $this->_pledgeValues['pledgePayment']);
$defaults['financial_type_id'] = CRM_Utils_Array::value('financial_type_id', $this->_pledgeValues);
return $defaults;
}
- // set soft credit defaults
+ // Set soft credit defaults.
CRM_Contribute_Form_SoftCredit::setDefaultValues($defaults, $this);
if ($this->_mode) {
$config = CRM_Core_Config::singleton();
- // set default country from config if no country set
+ // Set default country from config if no country set.
if (empty($defaults["billing_country_id-{$this->_bltID}"])) {
$defaults["billing_country_id-{$this->_bltID}"] = $config->defaultContactCountry;
}
$this->_contactID = $defaults['contact_id'];
}
- // Set $newCredit variable in template to control whether link to credit card mode is included
+ // Set $newCredit variable in template to control whether link to credit card mode is included.
$this->assign('newCredit', CRM_Core_Config::isEnabledBackOfficeCreditCardPayments());
- // fix the display of the monetary value, CRM-4038
+ // Fix the display of the monetary value, CRM-4038.
if (isset($defaults['total_amount'])) {
if (!empty($defaults['tax_amount'])) {
$componentDetails = CRM_Contribute_BAO_Contribution::getComponentDetails($this->_id);
}
$this->assign('showOption', TRUE);
- // for Premium section
+ // For Premium section.
if ($this->_premiumID) {
$this->assign('showOption', FALSE);
$options = isset($this->_options[$this->_productDAO->product_id]) ? $this->_options[$this->_productDAO->product_id] : "";
));
$currency = CRM_Utils_Array::value('currency', $defaults);
$this->assign('currency', $currency);
- // Hack to get currency info to the js layer. CRM-11440
+ // Hack to get currency info to the js layer. CRM-11440.
CRM_Utils_Money::format(1);
$this->assign('currencySymbol', CRM_Utils_Array::value($currency, CRM_Utils_Money::$_currencySymbols));
$this->assign('totalAmount', CRM_Utils_Array::value('total_amount', $defaults));
- //inherit campaign from pledge.
+ // Inherit campaign from pledge.
if ($this->_ppID && !empty($this->_pledgeValues['campaign_id'])) {
$defaults['campaign_id'] = $this->_pledgeValues['campaign_id'];
}