You are here

TestConditionFalse.php in Rules 8.3

File

tests/modules/rules_test/src/Plugin/Condition/TestConditionFalse.php
View source
<?php

namespace Drupal\rules_test\Plugin\Condition;

use Drupal\rules\Core\RulesConditionBase;

/**
 * Provides an always-FALSE test condition.
 *
 * @Condition(
 *   id = "rules_test_false",
 *   label = @Translation("Test condition returning false"),
 *   category = @Translation("Tests")
 * )
 */
class TestConditionFalse extends RulesConditionBase {

  /**
   * {@inheritdoc}
   */
  public function evaluate() {
    return FALSE;
  }

  /**
   * {@inheritdoc}
   */
  public function summary() {

    // We don't care about summaries for test condition plugins.
    return '';
  }

}

Classes

Namesort descending Description
TestConditionFalse Provides an always-FALSE test condition.