public function RulesConditionalCaseUI::buildContent in Conditional Rules 7
Same name and namespace in other branches
- 8 includes/rules_conditional.ui.inc \RulesConditionalCaseUI::buildContent()
Implements RulesPluginUIInterface.
Shows a preview of the configuration settings.
Overrides RulesContainerPluginUI::buildContent
File
- includes/
rules_conditional.ui.inc, line 166 - Plugin UI implementation.
Class
- RulesConditionalCaseUI
- UI for supporting option lists in the case value.
Code
public function buildContent() {
$content = parent::buildContent();
// Use option label for text.
if (isset($this->element->settings['value'])) {
$value = $this->element->settings['value'];
$labels = $this
->getValueOptionLabels();
$content['label']['#markup'] = t('@plugin: @case', array(
'@plugin' => $this->element
->label(),
'@case' => isset($labels[$value]) ? $labels[$value] : $value,
));
unset($content['description']['parameter']['value']);
}
return $content;
}