| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
protected $_id;
/**
- * The default values for form fields
+ * The default values for form fields.
*
* @var int
*/
protected $_values;
/**
- * The name of the BAO object for this form
+ * The name of the BAO object for this form.
*
* @var string
*/
protected $_BAOName;
/**
- * Basic setup
+ * Basic setup.
*/
- function preProcess() {
- $this->_id = $this->get('id');
+ public function preProcess() {
+ $this->_id = $this->get('id');
$this->_BAOName = $this->get('BAOName');
- $this->_values = array();
+ $this->_values = array();
if (isset($this->_id)) {
$params = array('id' => $this->_id);
// this is needed if the form is outside the CRM name space
$baoName = $this->_BAOName;
- $baoName::retrieve($params, $this->_values );
+ $baoName::retrieve($params, $this->_values);
}
}
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return array
*/
- function setDefaultValues() {
+ public function setDefaultValues() {
if (isset($this->_id) && empty($this->_values)) {
$this->_values = array();
$params = array('id' => $this->_id);
$baoName = $this->_BAOName;
- $baoName::retrieve($params, $this->_values );
+ $baoName::retrieve($params, $this->_values);
}
$defaults = $this->_values;
}
/**
- * Add standard buttons
+ * Add standard buttons.
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_action & CRM_Core_Action::VIEW || $this->_action & CRM_Core_Action::PREVIEW) {
);
}
}
-}
+}