You are here

function _patterns_scan_is_action in Patterns 7

Same name and namespace in other branches
  1. 7.2 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

_patterns_scan_is_section()

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 303
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));
}