<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
class CRM_Custom_Form_Preview extends CRM_Core_Form {
/**
- * the group tree data
+ * The group tree data
*
* @var array
*/
protected $_groupTree;
/**
- * pre processing work done here.
+ * Pre processing work done here.
*
* gets session variables for group or field id
*
- * @param null
- *
* @return void
- * @access public
*/
- function preProcess() {
+ public function preProcess() {
// get the controller vars
$this->_groupId = $this->get('groupId');
$this->_fieldId = $this->get('fieldId');
if ($this->_fieldId) {
// field preview
$defaults = array();
- $params = array('id' => $this->_fieldId);
+ $params = array('id' => $this->_fieldId);
$fieldDAO = new CRM_Core_DAO_CustomField();
CRM_Core_DAO::commonRetrieve('CRM_Core_DAO_CustomField', $params, $defaults);
/**
* Set the default form values
*
- * @param null
- *
- * @return array the default array reference
- * @access protected
+ * @return array
+ * the default array reference
*/
- function setDefaultValues() {
+ public function setDefaultValues() {
$defaults = array();
CRM_Core_BAO_CustomGroup::setDefaults($this->_groupTree, $defaults, FALSE, FALSE);
/**
* Build the form object
*
- * @param null
- *
* @return void
- * @access public
*/
public function buildQuickForm() {
if (is_array($this->_groupTree[$this->_groupId])) {
);
}
}
-