function _patterns_scan_is_action in Patterns 7.2
Same name and namespace in other branches
- 7 includes/parser/scan.inc \_patterns_scan_is_action()
Determines whether an array is actually an action.
An action is an array, whose key name is a valid action name.
Parameters
array $action The array to check:
Return value
Boolean TRUE if the array is an action
See also
1 call to _patterns_scan_is_action()
- _patterns_scan_is_section in includes/
parser/ scan.inc - Determines whether an array is actually a section.
File
- includes/
parser/ scan.inc, line 364 - Helping functions for the parser.
Code
function _patterns_scan_is_action($action = NULL) {
if (is_null($action)) {
return FALSE;
}
if (!is_array($action)) {
return FALSE;
}
return patterns_parser_is_valid_action_name(key($action));
}