public function RulesConditionalCase::pluginParameterInfo in Conditional Rules 8
Same name and namespace in other branches
- 7 includes/rules_conditional.plugin.inc \RulesConditionalCase::pluginParameterInfo()
File
- includes/
rules_conditional.plugin.inc, line 275 - Rules plugin implementation.
Class
- RulesConditionalCase
- Switch case.
Code
public function pluginParameterInfo() {
$parameterInfo = array(
'value' => array(
'type' => '*',
'label' => t('Data value'),
'description' => t('The value to compare the data with.'),
'allow null' => TRUE,
),
'fall_through' => array(
'type' => 'boolean',
'label' => t('Fall through'),
'description' => t('Fall through to next case when complete. If this option is checked, the next case is automatically executed (regardless of the case value) when this case is finished. If not, the switch will terminate when the case is finished.'),
'optional' => TRUE,
'default value' => FALSE,
'restriction' => 'input',
),
);
// Derive parameter info from switch variable selector.
$dataSelector = isset($this->parent->settings['data:select']) ? $this->parent->settings['data:select'] : NULL;
if ($wrapper = $this
->applyDataSelector($dataSelector)) {
$parameterInfo['value']['type'] = $wrapper
->type();
}
return $parameterInfo;
}