<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
class CRM_Contact_Form_Domain extends CRM_Core_Form {
/**
- * the group id, used when editing a group
+ * The group id, used when editing a group
*
* @var int
*/
protected $_id;
/**
- * the contact_id of domain
+ * The contact_id of domain
*
* @var int
*/
protected $_contactId;
/**
- * default from email address option value id.
+ * Default from email address option value id.
*
* @var int
*/
protected $_fromEmailId = NULL;
/**
- * default location type fields
+ * Default location type fields
*
* @var array
*/
protected $_locationDefaults = array();
/**
- * how many locationBlocks should we display?
+ * How many locationBlocks should we display?
*
* @var int
* @const
*/
- CONST LOCATION_BLOCKS = 1;
+ const LOCATION_BLOCKS = 1;
- function preProcess() {
+ public function preProcess() {
CRM_Utils_System::setTitle(ts('Organization Address and Contact Info'));
$breadCrumbPath = CRM_Utils_System::url('civicrm/admin', 'reset=1');
CRM_Utils_System::appendBreadCrumb(ts('Administer CiviCRM'), $breadCrumbPath);
}
/*
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
- * @access public
* @return void
*/
/**
/**
* @return array
*/
- function setDefaultValues() {
+ public function setDefaultValues() {
$defaults = array();
$params = array();
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
- function addRules() {
+ public function addRules() {
$this->addFormRule(array('CRM_Contact_Form_Domain', 'formRule'));
}
/**
- * global validation rules for the form
+ * Global validation rules for the form
*
- * @param array $fields posted values of the form
+ * @param array $fields
+ * Posted values of the form.
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
- static function formRule($fields) {
+ public static function formRule($fields) {
// check for state/country mapping
$errors = CRM_Contact_Form_Edit_Address::formRule($fields, CRM_Core_DAO::$_nullArray, CRM_Core_DAO::$_nullObject);
// $errors === TRUE means no errors from above formRule excution,
* Process the form when submitted
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->exportValues();
}
$params += array('contact_id' => $this->_contactId);
- $contactParams = array (
+ $contactParams = array(
'sort_name' => $domain->name,
'display_name' => $domain->name,
'legal_name' => $domain->name,
$session->replaceUserContext(CRM_Utils_System::url('civicrm/admin', 'reset=1'));
}
}
-