You are here

public function TestTextCondition::evaluate in Rules 8.3

Evaluates the condition and returns TRUE or FALSE accordingly.

Return value

bool TRUE if the condition has been met, FALSE otherwise.

Overrides RulesConditionBase::evaluate

File

tests/modules/rules_test/src/Plugin/Condition/TestTextCondition.php, line 27

Class

TestTextCondition
Returns TRUE if the 'text' context parameter equals 'test value'.

Namespace

Drupal\rules_test\Plugin\Condition

Code

public function evaluate() {
  $text = $this
    ->getContextValue('text');
  return $text == 'test value';
}