Commit 216b50d0 authored by George's avatar George
Browse files

Issue #3278957 - Add "Does not exist" condition.

parent 8e962b5d
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@ class RequestParameter extends ConditionPluginBase implements ContainerFactoryPl
        'ends_with' => $this->t('Ends with'),
        'contains' => $this->t('Contains'),
        'exists' => $this->t('Exists'),
        'not_exists' => $this->t('Does not exist'),
      ],
    ];

@@ -186,6 +187,12 @@ class RequestParameter extends ConditionPluginBase implements ContainerFactoryPl
          $pass = TRUE;
        }
        break;

      case 'not_exists':
        if (empty($param_value)) {
          $pass = TRUE;
        }
        break;
    }

    if ($this->isNegated()) {