function RulesState::defaultVariables
Defines always-available variables.
Parameters
$key: (optional)
4 calls to RulesState::defaultVariables()
- RulesContainerPlugin::availableVariables in includes/
rules.core.inc - Returns info about variables available to be used as arguments for this element.
- RulesPlugin::availableVariables in includes/
rules.core.inc - Returns info about variables available to be used as arguments for this element.
- RulesReactionRule::availableVariables in includes/
rules.plugins.inc - RulesState::__construct in includes/
rules.state.inc - Constructs a RulesState object.
File
-
includes/
rules.state.inc, line 372
Class
- RulesState
- The rules evaluation state.
Code
public static function defaultVariables($key = NULL) {
// Add a variable for accessing site-wide data properties.
$vars['site'] = array(
'type' => 'site',
'label' => t('Site information'),
'description' => t("Site-wide settings and other global information."),
// Add the property info via a callback making use of the cached info.
'property info alter' => array(
'RulesData',
'addSiteMetadata',
),
'property info' => array(),
'optional' => TRUE,
);
return isset($key) ? $vars[$key] : $vars;
}