function RulesPlugin::getArgumentInfo

Returns info about the configured argument.

Return value

The determined info. If it's not known NULL is returned.

2 calls to RulesPlugin::getArgumentInfo()
RulesLoop::listItemInfo in includes/rules.plugins.inc
RulesPlugin::checkParameterSettings in includes/rules.core.inc
Checks whether parameters are correctly configured.

File

includes/rules.core.inc, line 1092

Class

RulesPlugin
Base class for rules plugins.

Code

public function getArgumentInfo($name) {
    $vars = $this->availableVariables();
    if (!empty($this->settings[$name . ':select']) && !empty($vars[$this->settings[$name . ':select']])) {
        return $vars[$this->settings[$name . ':select']];
    }
    elseif (!empty($this->settings[$name . ':select'])) {
        if ($wrapper = $this->applyDataSelector($this->settings[$name . ':select'])) {
            return $wrapper->info();
        }
        return;
    }
    elseif (isset($this->settings[$name . ':type'])) {
        return array(
            'type' => $this->settings[$name . ':type'],
        );
    }
    elseif (!isset($this->settings[$name]) && isset($vars[$name])) {
        return $vars[$name];
    }
}