You are here

public function RulesPlugin::parameterInfo in Rules 7.2

Returns info about parameters needed for executing the configured plugin.

Parameters

bool $optional: Whether optional parameters should be included.

See also

self::pluginParameterInfo()

3 calls to RulesPlugin::parameterInfo()
RulesContainerPlugin::parameterInfo in includes/rules.core.inc
Returns info about parameters needed for executing the configured plugin.
RulesContainerPlugin::setUpVariables in includes/rules.core.inc
Returns info about all variables that have to be setup in the state.
RulesPlugin::setUpVariables in includes/rules.core.inc
Returns info about all variables that have to be setup in the state.
1 method overrides RulesPlugin::parameterInfo()
RulesContainerPlugin::parameterInfo in includes/rules.core.inc
Returns info about parameters needed for executing the configured plugin.

File

includes/rules.core.inc, line 645
Rules base classes and interfaces needed for any rule evaluation.

Class

RulesPlugin
Base class for rules plugins.

Code

public function parameterInfo($optional = FALSE) {

  // We have to filter out parameters that are already configured.
  foreach ($this
    ->pluginParameterInfo() as $name => $info) {
    if (!isset($this->settings[$name . ':select']) && !isset($this->settings[$name]) && ($optional || empty($info['optional']) && $info['type'] != 'hidden')) {
      $vars[$name] = $info;
    }
  }
  return isset($vars) ? $vars : array();
}