You are here

public function BusinessRulesUtil::getCriteriaMetOperatorsOptions in Business Rules 2.x

Same name and namespace in other branches
  1. 8 src/Util/BusinessRulesUtil.php \Drupal\business_rules\Util\BusinessRulesUtil::getCriteriaMetOperatorsOptions()

Get a options array to use with criteriaMet method.

Return value

array Array of operators.

File

src/Util/BusinessRulesUtil.php, line 481

Class

BusinessRulesUtil
Class BusinessRulesUtil.

Namespace

Drupal\business_rules\Util

Code

public function getCriteriaMetOperatorsOptions() {
  $operators = [
    self::BIGGER => '>',
    self::BIGGER_OR_EQUALS => '>=',
    self::SMALLER => '<',
    self::SMALLER_OR_EQUALS => '<=',
    self::EQUALS => '=',
    self::DIFFERENT => '!=',
    self::IS_EMPTY => $this
      ->t('Data value is empty'),
    self::CONTAINS => $this
      ->t('Contains'),
    self::STARTS_WITH => $this
      ->t('Starts with'),
    self::ENDS_WITH => $this
      ->t('Ends with'),
  ];
  return $operators;
}