CRM_Core_Action
class CRM_Core_Action
The core concept of the system is an action performed on an object. Typically this will be a "data model" object as specified in the API specs. We attempt to keep the number and type of actions consistent and similar across all objects (thus providing both reuse and standards)
Constants
NONE |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
ADD |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
UPDATE |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
VIEW |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
DELETE |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
BROWSE |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
ENABLE |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
DISABLE |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
EXPORT |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
BASIC |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
ADVANCED |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
PREVIEW |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
FOLLOWUP |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
MAP |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
PROFILE |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
COPY |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
RENEW |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
DETACH |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
REVERT |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
CLOSE |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
REOPEN |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
MAX_ACTION |
Different possible actions are defined here. Keep in sync with the constant from CRM_Core_Form for various modes. |
Properties
static array | $_names | Map the action names to the relevant constant. We perform bit manipulation operations so we can perform multiple actions on the same object if needed | |
static array | $_description | The flipped version of the names array, initialized when used |
Methods
Called by the request object to translate a string into a mask.
Given a string or an array of strings, determine the bitmask for this set of actions
Given a string determine the bitmask for this specific string.
Given an action mask, find the corresponding description
Given a set of links and a mask, return the html action string for the links associated with the mask
Given a set of links and a mask, return a filtered (by mask) array containing the final links with parsed values and calling hooks as appropriate.
Given a string and an array of values, substitute the real values in the placeholder in the str in the CiviCRM format
Get the mask for a permission (view, edit or null)
Details
at line 116
static int
resolve(string $str)
Called by the request object to translate a string into a mask.
at line 135
static int
map(mixed $item)
Given a string or an array of strings, determine the bitmask for this set of actions
at line 158
static int
mapItem(string $item)
Given a string determine the bitmask for this specific string.
at line 173
static string
description(int $mask)
Given an action mask, find the corresponding description
at line 203
static string
formLink(array $links, int $mask, array $values, string $extraULName = 'more', bool $enclosedAllInSingleUL = FALSE, null $op = NULL, null $objectName = NULL, int $objectId = NULL)
Given a set of links and a mask, return the html action string for the links associated with the mask
at line 319
static array|null
filterLinks(array $links, int $mask, array $values, null $op = NULL, null $objectName = NULL, int $objectId = NULL)
Given a set of links and a mask, return a filtered (by mask) array containing the final links with parsed values and calling hooks as appropriate.
Use this when passing a set of action links to the API or to the form without adding html formatting.
at line 372
static string
replace(string $str, array $values)
Given a string and an array of values, substitute the real values in the placeholder in the str in the CiviCRM format
at line 387
static int
mask(array $permissions)
Get the mask for a permission (view, edit or null)