Commit b926e8e3 authored by Wolfgang Ziegler's avatar Wolfgang Ziegler
Browse files

Fixed 'negate' default configuration of condition expressions.

parent 9823ba0c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ use Drupal\rules\Engine\RulesConditionContainerInterface;
use Drupal\rules\Engine\RulesExpressionInterface;
use Drupal\rules\Engine\RulesExpressionTrait;
use Drupal\rules\Engine\RulesState;
use Drupal\rules\Exception\InvalidExpressionException;
use Drupal\rules\Plugin\RulesExpressionPluginManager;
use Symfony\Component\DependencyInjection\ContainerInterface;

+10 −3
Original line number Diff line number Diff line
@@ -55,10 +55,7 @@ class RulesCondition extends RulesConditionBase implements RulesExpressionCondit
   *   The data processor plugin manager.
   */
  public function __construct(array $configuration, $plugin_id, $plugin_definition, ConditionManager $conditionManager, RulesDataProcessorManager $processor_manager) {
    // Per default the result of this expression is not negated.
    $configuration += ['negate' => FALSE];
    parent::__construct($configuration, $plugin_id, $plugin_definition);

    $this->conditionManager = $conditionManager;
    $this->processorManager = $processor_manager;
  }
@@ -76,6 +73,16 @@ class RulesCondition extends RulesConditionBase implements RulesExpressionCondit
    );
  }

  /**
   * {@inheritdoc}
   */
  public function defaultConfiguration() {
    return [
      // Per default the result of this expression is not negated.
      'negate' => FALSE,
    ];
  }

  /**
   * {@inheritdoc}
   */