function patterns_parser_is_valid_action_name in Patterns 7.2
Same name and namespace in other branches
- 7 includes/parser/parser.inc \patterns_parser_is_valid_action_name()
Checks whether a string is a valid action name.
Calls patterns_actions() to determine the list of valid action names.
Parameters
mixed $action The string to check.:
Return value
Boolean TRUE if the string is a valid action name
1 call to patterns_parser_is_valid_action_name()
- _patterns_scan_is_action in includes/
parser/ scan.inc - Determines whether an array is actually an action.
File
- includes/
parser/ parser.inc, line 254
Code
function patterns_parser_is_valid_action_name($action = NULL) {
if (is_null($action)) {
return FALSE;
}
$actions = patterns_actions();
if (in_array($action, $actions)) {
return TRUE;
}
else {
return FALSE;
}
}