You are here

public function ConfigPagesValueAccess::getOperandOptions in Config Pages 8.3

Same name and namespace in other branches
  1. 8.2 src/Plugin/Condition/ConfigPagesValueAccess.php \Drupal\config_pages\Plugin\Condition\ConfigPagesValueAccess::getOperandOptions()

Returns supported operators.

Return value

array Array of operators with their descriptions.

2 calls to ConfigPagesValueAccess::getOperandOptions()
ConfigPagesValueAccess::buildConfigurationForm in src/Plugin/Condition/ConfigPagesValueAccess.php
Form constructor.
ConfigPagesValueAccess::summary in src/Plugin/Condition/ConfigPagesValueAccess.php
Provides a human readable summary of the condition's configuration.

File

src/Plugin/Condition/ConfigPagesValueAccess.php, line 147

Class

ConfigPagesValueAccess
Provides a 'Access by ConfigPage field value' condition.

Namespace

Drupal\config_pages\Plugin\Condition

Code

public function getOperandOptions() {
  $operator = [
    '==' => $this
      ->t('Is equal to'),
    '<' => $this
      ->t('Is less than'),
    '<=' => $this
      ->t('Is less than or equal to'),
    '!=' => $this
      ->t('Is not equal to'),
    '>=' => $this
      ->t('Is greater than or equal to'),
    '>' => $this
      ->t('Is greater than'),
    'isset' => $this
      ->t('Not empty'),
  ];
  return $operator;
}