+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
-*/
+ */
/**
* The core concept of the system is an action performed on an object. Typically this will be a "data model" object
* 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$
*
*/
*
* @var array $_names type of variable name to action constant
*
- * @static
*/
static $_names = array(
'add' => self::ADD,
* 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;
*
* @return int
* the action mask corresponding to the input args
- * @static
*/
public static function map($item) {
$mask = 0;
}
/**
- * 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);
*
* @return string
* the corresponding action description
- * @static
*/
public static function description($mask) {
if (!isset($_description)) {
*
* @return string
* the html string
- * @static
*/
- static function formLink(
+ public static function formLink(
$links,
$mask,
$values,
*
* @return string
* the substituted string
- * @static
*/
public static function &replace(&$str, &$values) {
foreach ($values as $n => $v) {
/**
* 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;
return $mask;
}
+
}