<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
protected $_fields = NULL;
- function preProcess() {
+ public function preProcess() {
parent::preProcess();
$this->_fields = array(
}
/**
- * Function to build the form
+ * Build the form object
*
* @param bool $check
*
* @return void
- * @access public
*/
public function buildQuickForm($check = FALSE) {
parent::buildQuickForm();
return;
}
- $attributes = CRM_Core_DAO::getAttribute( 'CRM_Financial_DAO_PaymentProcessorType' );
+ $attributes = CRM_Core_DAO::getAttribute('CRM_Financial_DAO_PaymentProcessorType');
foreach ($this->_fields as $field) {
$required = CRM_Utils_Array::value('required', $field, FALSE);
/**
* @return array
*/
- function setDefaultValues() {
+ public function setDefaultValues() {
$defaults = array();
if (!$this->_id) {
return $defaults;
}
- $dao = new CRM_Financial_DAO_PaymentProcessorType( );
+ $dao = new CRM_Financial_DAO_PaymentProcessorType();
$dao->id = $this->_id;
if (!$dao->find(TRUE)) {
}
/**
- * Function to process the form
+ * Process the form submission
*
- * @access public
*
* @return void
*/
public function postProcess() {
- CRM_Utils_System::flushCache( 'CRM_Financial_DAO_PaymentProcessorType' );
+ CRM_Utils_System::flushCache('CRM_Financial_DAO_PaymentProcessorType');
if ($this->_action & CRM_Core_Action::DELETE) {
CRM_Financial_BAO_PaymentProcessorType::del($this->_id);
CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
}
- $dao = new CRM_Financial_DAO_PaymentProcessorType( );
+ $dao = new CRM_Financial_DAO_PaymentProcessorType();
- $dao->id = $this->_id;
+ $dao->id = $this->_id;
$dao->is_default = CRM_Utils_Array::value('is_default', $values, 0);
- $dao->is_active = CRM_Utils_Array::value('is_active', $values, 0);
- $dao->is_recur = CRM_Utils_Array::value('is_recur', $values, 0);
+ $dao->is_active = CRM_Utils_Array::value('is_active', $values, 0);
+ $dao->is_recur = CRM_Utils_Array::value('is_recur', $values, 0);
$dao->name = $values['name'];
$dao->description = $values['description'];
}
$dao->save();
}
-}
+}