Merge pull request #5760 from sudhabisht/SMSissue
[civicrm-core.git] / CRM / Core / ShowHideBlocks.php
index feeb368fa788fdc6d2c0e2942457bb4b28be5130..aa6fbf24694e1d3b1f40a484479cf52da033efa2 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | 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-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
@@ -42,21 +42,21 @@ class CRM_Core_ShowHideBlocks {
   static $_showIcon, $_hideIcon;
 
   /**
-   * The array of ids of blocks that will be shown
+   * The array of ids of blocks that will be shown.
    *
    * @var array
    */
   protected $_show;
 
   /**
-   * The array of ids of blocks that will be hidden
+   * The array of ids of blocks that will be hidden.
    *
    * @var array
    */
   protected $_hide;
 
   /**
-   * Class constructor
+   * Class constructor.
    *
    * @param array $show
    *   Initial value of show array.
@@ -64,7 +64,6 @@ class CRM_Core_ShowHideBlocks {
    *   Initial value of hide array.
    *
    * @return \CRM_Core_ShowHideBlocks the newly created object
-   * @access public
    */
   public function __construct($show = NULL, $hide = NULL) {
     if (!empty($show)) {
@@ -83,10 +82,9 @@ class CRM_Core_ShowHideBlocks {
   }
 
   /**
-   * Load icon vars used in hide and show links
+   * Load icon vars used in hide and show links.
    *
    * @return void
-   * @static
    */
   public static function setIcons() {
     if (!isset(self::$_showIcon)) {
@@ -97,7 +95,7 @@ class CRM_Core_ShowHideBlocks {
   }
 
   /**
-   * Add the values from this class to the template
+   * Add the values from this class to the template.
    *
    * @return void
    */
@@ -128,7 +126,7 @@ class CRM_Core_ShowHideBlocks {
   }
 
   /**
-   * Add a value to the show array
+   * Add a value to the show array.
    *
    * @param string $name
    *   Id to be added.
@@ -143,7 +141,7 @@ class CRM_Core_ShowHideBlocks {
   }
 
   /**
-   * Add a value to the hide array
+   * Add a value to the hide array.
    *
    * @param string $name
    *   Id to be added.
@@ -158,7 +156,7 @@ class CRM_Core_ShowHideBlocks {
   }
 
   /**
-   * Create a well formatted html link from the smaller pieces
+   * Create a well formatted html link from the smaller pieces.
    *
    * @param string $name
    *   Name of the link.
@@ -166,14 +164,15 @@ class CRM_Core_ShowHideBlocks {
    * @param string $text
    * @param string $js
    *
-   * @return string      the formatted html link
+   * @return string
+   *   the formatted html link
    */
   public static function linkHtml($name, $href, $text, $js) {
     return '<a name="' . $name . '" id="' . $name . '" href="' . $href . '" ' . $js . ">$text</a>";
   }
 
   /**
-   * Create links that we can use in the form
+   * Create links that we can use in the form.
    *
    * @param CRM_Core_Form $form
    *   The form object.
@@ -186,7 +185,6 @@ class CRM_Core_ShowHideBlocks {
    *
    * @param bool $assign
    *
-   * @static
    *
    * @return void
    */
@@ -195,7 +193,7 @@ class CRM_Core_ShowHideBlocks {
     $hideCode = "cj('#id_{$prefix}').hide(); cj('#id_{$prefix}_show').show(); return false;";
 
     self::setIcons();
-    $values         = array();
+    $values = array();
     $values['show'] = self::linkHtml("${prefix}_show", "#${prefix}_hide", self::$_showIcon . $showLinkText, "onclick=\"$showCode\"");
     $values['hide'] = self::linkHtml("${prefix}_hide", "#${prefix}", self::$_hideIcon . $hideLinkText, "onclick=\"$hideCode\"");
 
@@ -208,7 +206,7 @@ class CRM_Core_ShowHideBlocks {
   }
 
   /**
-   * Create html link elements that we can use in the form
+   * Create html link elements that we can use in the form.
    *
    * @param CRM_Core_Form $form
    *   The form object.
@@ -270,4 +268,5 @@ class CRM_Core_ShowHideBlocks {
       );
     }
   }
+
 }