public function RulesConditionalCaseUI::form in Conditional Rules 7
Same name and namespace in other branches
- 8 includes/rules_conditional.ui.inc \RulesConditionalCaseUI::form()
Generates a table for editing the contained elements.
Overrides RulesContainerPluginUI::form
File
- includes/
rules_conditional.ui.inc, line 139 - Plugin UI implementation.
Class
- RulesConditionalCaseUI
- UI for supporting option lists in the case value.
Code
public function form(&$form, &$form_state, $options = array(), $iterator = NULL) {
// TODO Remove when http://drupal.org/node/1676998 is fixed.
$baseCount = count(explode('/', RulesPluginUI::$basePath));
$op = arg($baseCount + 2);
if ($op == 'add') {
// Redirect to extended path.
$pathAddPredicate = RulesPluginUI::path($this->element
->root()->name, 'add-case', $this->element
->parentElement(), $this->element
->plugin());
drupal_goto($pathAddPredicate);
}
$options['init'] = FALSE;
parent::form($form, $form_state, $options, $iterator);
}