Merge pull request #4814 from atif-shaikh/CRM-14199Improvement
[civicrm-core.git] / CRM / Contact / Form / Task.php
index b783d0230d8acdf807110d123cc8f7e84d33d13e..e39ad4d9089a69f3c8aabd0e88689fd070e35dcd 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -40,7 +40,7 @@
 class CRM_Contact_Form_Task extends CRM_Core_Form {
 
   /**
-   * the task being performed
+   * The task being performed
    *
    * @var int
    */
@@ -87,22 +87,21 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
   static protected $_searchFormValues;
 
   /**
-   * build all the data structures needed to build the form
+   * Build all the data structures needed to build the form
    *
    * @param
    *
    * @return void
-   * @access public
    */
-  function preProcess() {
+  public function preProcess() {
     self::preProcessCommon($this);
   }
 
   /**
-   * @param $form
+   * @param CRM_Core_Form $form
    * @param bool $useTable
    */
-  static function preProcessCommon(&$form, $useTable = FALSE) {
+  public static function preProcessCommon(&$form, $useTable = FALSE) {
 
     $form->_contactIds = array();
     $form->_contactTypes = array();
@@ -278,7 +277,7 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
   }
 
   /**
-   * Function to get the contact id for custom search
+   * Get the contact id for custom search
    * we are not using prev/next table incase of custom search
    */
   public function getContactIds() {
@@ -327,14 +326,13 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
 
 
   /**
-   * This function sets the default values for the form. Relationship that in edit/view action
+   * Set default values for the form. Relationship that in edit/view action
    * the default values are retrieved from the database
    *
-   * @access public
    *
    * @return array
    */
-  function setDefaultValues() {
+  public function setDefaultValues() {
     $defaults = array();
     return $defaults;
   }
@@ -343,48 +341,40 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
    * This function is used to add the rules for form.
    *
    * @return void
-   * @access public
    */
-  function addRules() {
+  public function addRules() {
   }
 
   /**
-   * Function to actually build the form
+   * Build the form object
    *
    * @return void
-   * @access public
    */
   public function buildQuickForm() {
     $this->addDefaultButtons(ts('Confirm Action'));
   }
 
   /**
-   * process the form after the input has been submitted and validated
+   * Process the form after the input has been submitted and validated
    *
-   * @access public
    *
    * @return void
    */
   public function postProcess() {
   }
 
-  //end of function
-
   /**
-   * simple shell that derived classes can call to add buttons to
+   * Simple shell that derived classes can call to add buttons to
    * the form with a customized title for the main Submit
    *
    * @param string $title title of the main button
-   * @param string $nextType
+   * @param string $nextType button type for the form after processing
    * @param string $backType
    * @param bool $submitOnce
    *
-   * @internal param string $type button type for the form after processing
-   *
    * @return void
-   * @access public
    */
-  function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
+  public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
     $this->addButtons(array(
         array(
           'type' => $nextType,
@@ -400,10 +390,9 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
   }
 
   /**
-   * replace ids of household members in $this->_contactIds with the id of their household.
+   * Replace ids of household members in $this->_contactIds with the id of their household.
    * CRM-8338
    *
-   * @access public
    *
    * @return void
    */
@@ -468,4 +457,3 @@ class CRM_Contact_Form_Task extends CRM_Core_Form {
     }
   }
 }
-