class ComparisonOperatorOptions
Options provider to return a choice of data comparison operators.
Hierarchy
- class \Drupal\rules\TypedData\Options\OptionsProviderBase implements \Drupal\Core\TypedData\OptionsProviderInterface uses \Drupal\Core\StringTranslation\StringTranslationTrait
- class \Drupal\rules\TypedData\Options\ComparisonOperatorOptions extends \Drupal\rules\TypedData\Options\OptionsProviderBase
Expanded class hierarchy of ComparisonOperatorOptions
File
-
src/
TypedData/ Options/ ComparisonOperatorOptions.php, line 10
Namespace
Drupal\rules\TypedData\OptionsView source
class ComparisonOperatorOptions extends OptionsProviderBase {
/**
* {@inheritdoc}
*/
public function getPossibleOptions(AccountInterface $account = NULL) {
return [
'==' => $this->t('== (equals)'),
'<' => $this->t('< (less than)'),
'>' => $this->t('> (greater than)'),
'contains' => $this->t('Contains (for strings or arrays)'),
'in' => $this->t('In (for arrays or lists)'),
];
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
ComparisonOperatorOptions::getPossibleOptions | public | function | Returns an array of possible values with labels for display. | Overrides OptionsProviderInterface::getPossibleOptions | |
OptionsProviderBase::getPossibleValues | public | function | Returns an array of possible values. | Overrides OptionsProviderInterface::getPossibleValues | |
OptionsProviderBase::getSettableOptions | public | function | Returns an array of settable values with labels for display. | Overrides OptionsProviderInterface::getSettableOptions | |
OptionsProviderBase::getSettableValues | public | function | Returns an array of settable values. | Overrides OptionsProviderInterface::getSettableValues | |
StringTranslationTrait::$stringTranslation | protected | property | The string translation service. | 3 | |
StringTranslationTrait::formatPlural | protected | function | Formats a string containing a count of items. | ||
StringTranslationTrait::getNumberOfPlurals | protected | function | Returns the number of plurals supported by a given language. | ||
StringTranslationTrait::getStringTranslation | protected | function | Gets the string translation service. | ||
StringTranslationTrait::setStringTranslation | public | function | Sets the string translation service to use. | 2 | |
StringTranslationTrait::t | protected | function | Translates a string to the current language or to a given language. |