<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
class CRM_Admin_Form_Mapping extends CRM_Admin_Form {
/**
- * Function to build the form
+ * Build the form object
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
public function buildQuickForm() {
parent::buildQuickForm();
+ $this->setPageTitle(ts('Field Mapping'));
+
if ($this->_action == CRM_Core_Action::DELETE) {
return;
}
$this->add('text', 'name', ts('Name'),
CRM_Core_DAO::getAttribute('CRM_Core_DAO_Mapping', 'name'), TRUE
);
- $this->addRule('name', ts('Name already exists in Database.'), 'objectExists', array('CRM_Core_DAO_Mapping', $this->_id));
+ $this->addRule('name', ts('Name already exists in Database.'), 'objectExists', array(
+ 'CRM_Core_DAO_Mapping',
+ $this->_id,
+ ));
$this->addElement('text', 'description', ts('Description'),
CRM_Core_DAO::getAttribute('CRM_Core_DAO_Mapping', 'description')
}
}
- function setDefaultValues() {
+ /**
+ * @return array
+ */
+ public function setDefaultValues() {
$defaults = parent::setDefaultValues();
return $defaults;
}
/**
- * Function to process the form
+ * Process the form submission
*
- * @access public
*
* @return void
*/
CRM_Core_BAO_Mapping::add($params);
}
}
- //end of function
-}
+}