You are here

public static function OperatorsHelper::getMultipleValuesOperators in Entity Share 8

Same name and namespace in other branches
  1. 8.3 modules/entity_share_server/src/OperatorsHelper.php \Drupal\entity_share_server\OperatorsHelper::getMultipleValuesOperators()
  2. 8.2 modules/entity_share_server/src/OperatorsHelper.php \Drupal\entity_share_server\OperatorsHelper::getMultipleValuesOperators()

Helper function to get the multiple values operators.

Operators that allow to have multiple values entered.

Return value

array An array of options.

2 calls to OperatorsHelper::getMultipleValuesOperators()
Channel::getQuery in modules/entity_share_server/src/Entity/Channel.php
Generate URL query.
FilterEditForm::buildValueElement in modules/entity_share_server/src/Form/FilterEditForm.php
Helper function to generate filter form elements.

File

modules/entity_share_server/src/OperatorsHelper.php, line 54

Class

OperatorsHelper
Defines the Operators helper class.

Namespace

Drupal\entity_share_server

Code

public static function getMultipleValuesOperators() {
  return [
    'IN' => 'IN',
    'NOT IN' => 'NOT IN',
    'BETWEEN' => 'BETWEEN',
  ];

  // TODO: The following operators are marked as multiple values in JSONAPI
  // documentation https://www.drupal.org/docs/8/modules/json-api/collections-filtering-sorting-and-paginating
  // But it does not work. See why.
  // '=' => '=',
  // '<' => '<',
  // '>' => '>',
  // '<>' => '<>',.
}