Merge pull request #4971 from kurund/batch-16
[civicrm-core.git] / CRM / Custom / Form / Preview.php
index 37f7262c612182d47084923cd2bae811332ae7f7..92c867b7b585d39afc0d096fa568d9545e181ed6 100644 (file)
@@ -1,7 +1,7 @@
 <?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);
 
@@ -95,12 +92,10 @@ class CRM_Custom_Form_Preview extends CRM_Core_Form {
   /**
    * 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);
@@ -111,10 +106,7 @@ class CRM_Custom_Form_Preview extends CRM_Core_Form {
   /**
    * Build the form object
    *
-   * @param null
-   *
    * @return void
-   * @access public
    */
   public function buildQuickForm() {
     if (is_array($this->_groupTree[$this->_groupId])) {
@@ -135,4 +127,3 @@ class CRM_Custom_Form_Preview extends CRM_Core_Form {
     );
   }
 }
-