function RulesContainerPlugin::parameterInfo

Overrides RulesPlugin::parameterInfo

1 call to RulesContainerPlugin::parameterInfo()
RulesContainerPlugin::setUpVariables in includes/rules.core.inc
Returns info about all variables that have to be setup in the state.

File

includes/rules.core.inc, line 2265

Class

RulesContainerPlugin
Base class for ContainerPlugins like Rules, Logical Operations or Loops.

Code

public function parameterInfo($optional = FALSE) {
    $params = parent::parameterInfo($optional);
    if (isset($this->info['variables'])) {
        foreach ($this->info['variables'] as $name => $var_info) {
            if (empty($var_info['handler']) && (!isset($var_info['parameter']) || $var_info['parameter'])) {
                $params[$name] = $var_info;
                // For lists allow empty variables by default.
                if (entity_property_list_extract_type($var_info['type'])) {
                    $params[$name] += array(
                        'allow null' => TRUE,
                    );
                }
            }
        }
    }
    return $params;
}