Merge pull request #4962 from totten/master-angular-ts
[civicrm-core.git] / CRM / Core / ShowHideBlocks.php
index e9f9616a05d8ea79cf657cd71e68cf02a10317b4..96707ae28e68f672a70168df504232c53e9db32b 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -58,10 +58,12 @@ class CRM_Core_ShowHideBlocks {
   /**
    * Class constructor
    *
-   * @param array $show initial value of show array
-   * @param array $hide initial value of hide array
+   * @param array $show
+   *   Initial value of show array.
+   * @param array $hide
+   *   Initial value of hide array.
    *
-   * @return \CRM_Core_ShowHideBlocks the newly created object@access public
+   * @return \CRM_Core_ShowHideBlocks the newly created object
    */
   public function __construct($show = NULL, $hide = NULL) {
     if (!empty($show)) {
@@ -83,7 +85,6 @@ class CRM_Core_ShowHideBlocks {
    * Load icon vars used in hide and show links
    *
    * @return void
-   * @static
    */
   public static function setIcons() {
     if (!isset(self::$_showIcon)) {
@@ -127,7 +128,8 @@ class CRM_Core_ShowHideBlocks {
   /**
    * Add a value to the show array
    *
-   * @param string $name id to be added
+   * @param string $name
+   *   Id to be added.
    *
    * @return void
    */
@@ -141,7 +143,8 @@ class CRM_Core_ShowHideBlocks {
   /**
    * Add a value to the hide array
    *
-   * @param string $name id to be added
+   * @param string $name
+   *   Id to be added.
    *
    * @return void
    */
@@ -155,12 +158,14 @@ class CRM_Core_ShowHideBlocks {
   /**
    * Create a well formatted html link from the smaller pieces
    *
-   * @param string $name name of the link
+   * @param string $name
+   *   Name of the link.
    * @param string $href
    * @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>";
@@ -169,14 +174,17 @@ class CRM_Core_ShowHideBlocks {
   /**
    * Create links that we can use in the form
    *
-   * @param CRM_Core_Form $form the form object
-   * @param string $prefix the attribute that we are referencing
-   * @param string $showLinkText the text to be shown for the show link
-   * @param string $hideLinkText the text to be shown for the hide link
+   * @param CRM_Core_Form $form
+   *   The form object.
+   * @param string $prefix
+   *   The attribute that we are referencing.
+   * @param string $showLinkText
+   *   The text to be shown for the show link.
+   * @param string $hideLinkText
+   *   The text to be shown for the hide link.
    *
    * @param bool $assign
    *
-   * @static
    *
    * @return void
    */
@@ -185,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\"");
 
@@ -200,14 +208,22 @@ class CRM_Core_ShowHideBlocks {
   /**
    * Create html link elements that we can use in the form
    *
-   * @param CRM_Core_Form $form          the form object
-   * @param int           $index         the current index of the element being processed
-   * @param int           $maxIndex      the max number of elements that will be processed
-   * @param string        $prefix        the attribute that we are referencing
-   * @param string        $showLinkText  the text to be shown for the show link
-   * @param string        $hideLinkText  the text to be shown for the hide link
-   * @param string        $elementType   the set the class
-   * @param string        $hideLink      the hide block string
+   * @param CRM_Core_Form $form
+   *   The form object.
+   * @param int $index
+   *   The current index of the element being processed.
+   * @param int $maxIndex
+   *   The max number of elements that will be processed.
+   * @param string $prefix
+   *   The attribute that we are referencing.
+   * @param string $showLinkText
+   *   The text to be shown for the show link.
+   * @param string $hideLinkText
+   *   The text to be shown for the hide link.
+   * @param string $elementType
+   *   The set the class.
+   * @param string $hideLink
+   *   The hide block string.
    *
    * @return void
    */
@@ -252,4 +268,5 @@ class CRM_Core_ShowHideBlocks {
       );
     }
   }
+
 }