<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
class CRM_Custom_Form_MoveField extends CRM_Core_Form {
/**
- * the src group id
+ * The src group id
*
* @var int
*/
protected $_srcGID;
/**
- * the src field id
+ * The src field id
*
* @var int
*/
protected $_srcFID;
/**
- * the dst group id
+ * The dst group id
*
* @var int
*/
protected $_dstGID;
/**
- * the dst field id
+ * The dst field id
*
* @var int
*/
protected $_srcFieldLabel;
/**
- * set up variables to build the form
+ * Set up variables to build the form
*
* @return void
* @acess protected
*/
- function preProcess() {
+ public function preProcess() {
$this->_srcFID = CRM_Utils_Request::retrieve('fid', 'Positive',
$this, TRUE
);
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
*
* @return array|bool
*/
- static function formRule($fields, $files, $self) {
+ public static function formRule($fields, $files, $self) {
$self->_dstGID = $fields['dst_group_id'];
$tmp = CRM_Core_BAO_CustomField::_moveFieldValidate($self->_srcFID, $self->_dstGID);
$errors = array();
* Process the form when submitted
*
* @return void
- * @access public
*/
public function postProcess() {
CRM_Core_BAO_CustomField::moveField($this->_srcFID, $this->_dstGID);
array(
1 => $this->_srcFieldLabel,
2 => $dstGroup,
- 3 => $srcUrl
+ 3 => $srcUrl,
)), '', 'success');
}
}
-