You are here

function patterns_parser_is_valid_action_name in Patterns 7.2

Same name and namespace in other branches
  1. 7 includes/parser/ \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.


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/
Determines whether an array is actually an action.


includes/parser/, line 254


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;