You are here

TestConditionTrue.php in Rules 8.3

File

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

namespace Drupal\rules_test\Plugin\Condition;

use Drupal\rules\Core\RulesConditionBase;

/**
 * Provides an always-TRUE test condition.
 *
 * @Condition(
 *   id = "rules_test_true",
 *   label = @Translation("Test condition returning true"),
 *   category = @Translation("Tests")
 * )
 */
class TestConditionTrue extends RulesConditionBase {

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

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

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

}

Classes

Namesort descending Description
TestConditionTrue Provides an always-TRUE test condition.