Merge pull request #5760 from sudhabisht/SMSissue
[civicrm-core.git] / CRM / Core / Action.php
index 353df9efc58adb49c17c0ef12e027689dee0b21e..25cac391052f5e04c923776b80d915eab26c3adc 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.                                    |
  |                                                                    |
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  * The core concept of the system is an action performed on an object. Typically this will be a "data model" object
@@ -31,7 +31,7 @@
  * and similar across all objects (thus providing both reuse and standards)
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
@@ -63,9 +63,9 @@ class CRM_Core_Action {
     RENEW = 32768,
     DETACH = 65536,
     REVERT = 131072,
-    CLOSE        = 262144,
-    REOPEN       = 524288,
-    MAX_ACTION   = 1048575;
+    CLOSE = 262144,
+    REOPEN = 524288,
+    MAX_ACTION = 1048575;
 
   //make sure MAX_ACTION = 2^n - 1 ( n = total number of actions )
 
@@ -74,9 +74,8 @@ class CRM_Core_Action {
    * bit manipulation operations so we can perform multiple
    * actions on the same object if needed
    *
-   * @var array $_names  type of variable name to action constant
+   * @var array $_names type of variable name to action constant
    *
-   * @static
    */
   static $_names = array(
     'add' => self::ADD,
@@ -94,27 +93,25 @@ class CRM_Core_Action {
     'renew' => self::RENEW,
     'detach' => self::DETACH,
     'revert' => self::REVERT,
-                           'close'         => self::CLOSE,
-                           'reopen'        => self::REOPEN,
+    'close' => self::CLOSE,
+    'reopen' => self::REOPEN,
   );
 
   /**
    * The flipped version of the names array, initialized when used
    *
    * @var array
-   * @static
    */
   static $_description;
 
   /**
-   * Called by the request object to translate a string into a mask
+   * Called by the request object to translate a string into a mask.
    *
    * @param string $str
    *   The action to be resolved.
    *
    * @return int
    *   the action mask corresponding to the input string
-   * @static
    */
   public static function resolve($str) {
     $action = 0;
@@ -134,7 +131,6 @@ class CRM_Core_Action {
    *
    * @return int
    *   the action mask corresponding to the input args
-   * @static
    */
   public static function map($item) {
     $mask = 0;
@@ -151,14 +147,13 @@ class CRM_Core_Action {
   }
 
   /**
-   * Given a string determine the bitmask for this specific string
+   * Given a string determine the bitmask for this specific string.
    *
    * @param string $item
    *   The input action to process.
    *
    * @return int
    *   the action mask corresponding to the input string
-   * @static
    */
   public static function mapItem($item) {
     $mask = CRM_Utils_Array::value(trim($item), self::$_names);
@@ -174,7 +169,6 @@ class CRM_Core_Action {
    *
    * @return string
    *   the corresponding action description
-   * @static
    */
   public static function description($mask) {
     if (!isset($_description)) {
@@ -205,9 +199,8 @@ class CRM_Core_Action {
    *
    * @return string
    *   the html string
-   * @static
    */
-  static function formLink(
+  public static function formLink(
     $links,
     $mask,
     $values,
@@ -317,7 +310,6 @@ class CRM_Core_Action {
    *
    * @return string
    *   the substituted string
-   * @static
    */
   public static function &replace(&$str, &$values) {
     foreach ($values as $n => $v) {
@@ -329,11 +321,8 @@ class CRM_Core_Action {
   /**
    * Get the mask for a permission (view, edit or null)
    *
-   * @param string the permission
-   *
    * @return int
    *   the mask for the above permission
-   * @static
    */
   public static function mask($permissions) {
     $mask = NULL;
@@ -355,4 +344,5 @@ class CRM_Core_Action {
 
     return $mask;
   }
+
 }