You are here

function patterns_is_form in Patterns 7.2

Heuristically determines if a function is a form or not

Parameters

mixed $form_id The name of the function:

Return value

boolean TRUE, if the function name maps to an existing form

File

includes/core/common.inc, line 422
The common functions used by the Batch and PHP running modes.

Code

function patterns_is_form($form_id = NULL, $form_state = array()) {
  $result = drupal_retrieve_form($form_id, $form_state);
  return isset($result) && is_array($result) && count($result) > 1;
}