You are here

public function RulesFormsFormEvaluator::evaluate in Rules Forms Support 7.2

Evaluates form elements to identify its structure in property info.

Parameters

array $form: The form array to evaluate.

Return value

array An array of property info for use in hook_rules_data_info().

File

includes/rules_forms.property.inc, line 32
Manages and Process each form property.

Class

RulesFormsFormEvaluator
Class in which the Form properties are evaluated.

Code

public function evaluate($form) {
  $info = array();
  $info['properties'] = array(
    'form' => array(),
    'form_state' => array(
      'values' => array(
        'type' => 'struct',
        'label' => 'values',
        'computed' => TRUE,
        'getter callback' => 'entity_property_verbatim_get',
        'auto creation' => 'rules_forms_create_structure',
        'property info' => array(),
      ),
    ),
  );
  $this
    ->buildPropertyInfo($form, $info['properties']['form'], $info['properties']['form_state']['values']['property info']);
  return $info;
}