You are here

class RulesConditionalEmptyUI in Conditional Rules 8

Same name and namespace in other branches
  1. 7 includes/rules_conditional.ui.inc \RulesConditionalEmptyUI

Empty UI for doing nothing with the plugin.

Hierarchy

Expanded class hierarchy of RulesConditionalEmptyUI

2 string references to 'RulesConditionalEmptyUI'
rules_conditional_rules_plugin_info in ./rules_conditional.rules.inc
Implements hook_rules_plugin_info().
rules_conditional_test_rules_plugin_info in tests/rules_conditional_test.module
Implements hook_rules_plugin_info().

File

includes/rules_conditional.ui.inc, line 39
Plugin UI implementation.

View source
class RulesConditionalEmptyUI extends RulesConditionalPluginUI {
  public function form(&$form, &$form_state, $options = array(), $iterator = NULL) {

    // Save element.
    $this->element
      ->save();

    // Redirect right away.
    $path = RulesPluginUI::defaultRedirect($this->element);
    drupal_goto($path);
  }
  public function operations() {
    $ops = parent::operations();

    // Get rid of the 'edit' link.
    if (isset($ops['#links']['edit'])) {
      unset($ops['#links']['edit']);
    }
    return $ops;
  }

}

Members