You are here

protected function ViewsConfigUpdater::mapOperatorFromSingleToMultiple in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/ViewsConfigUpdater.php \Drupal\views\ViewsConfigUpdater::mapOperatorFromSingleToMultiple()

Maps a single operator to a multiple one, if possible.

Parameters

string $single_operator: A single operator.

Return value

string A multiple operator or the original one if no mapping was available.

1 call to ViewsConfigUpdater::mapOperatorFromSingleToMultiple()
ViewsConfigUpdater::processMultivalueBaseFieldHandler in core/modules/views/src/ViewsConfigUpdater.php
Processes handlers affected by the multivalue base field update.

File

core/modules/views/src/ViewsConfigUpdater.php, line 403

Class

ViewsConfigUpdater
Provides a BC layer for modules providing old configurations.

Namespace

Drupal\views

Code

protected function mapOperatorFromSingleToMultiple($single_operator) {
  switch ($single_operator) {
    case '=':
      return 'or';
    case '!=':
      return 'not';
    default:
      return $single_operator;
  }
}