You are here

class EntityCondition in JSON:API Search API 8

A condition object for the EntityQuery.

Hierarchy

Expanded class hierarchy of EntityCondition

File

src/Query/EntityCondition.php, line 10

Namespace

Drupal\jsonapi_search_api\Query
View source
class EntityCondition extends BaseEntityCondition {

  /**
   * The allowed condition operators.
   *
   * The operators 'STARTS_WITH', 'CONTAINS', 'ENDS_WITH' are not supported by
   * the Search API module.
   *
   * @var string[]
   *
   * @see \Drupal\search_api\Query\ConditionSetInterface
   */
  public static $allowedOperators = [
    '=',
    '<>',
    '>',
    '>=',
    '<',
    '<=',
    'IN',
    'NOT IN',
    'BETWEEN',
    'NOT BETWEEN',
    'IS NULL',
    'IS NOT NULL',
  ];

}

Members

Namesort descending Modifiers Type Description Overrides
EntityCondition::$allowedOperators public static property The allowed condition operators. Overrides EntityCondition::$allowedOperators
EntityCondition::$field protected property The field to be evaluated.
EntityCondition::$operator protected property The condition operator.
EntityCondition::$value protected property The value against which the field should be evaluated.
EntityCondition::createFromQueryParameter public static function Creates an EntityCondition object from a query parameter.
EntityCondition::field public function The field to be evaluated.
EntityCondition::operator public function The comparison operator to use for the evaluation.
EntityCondition::OPERATOR_KEY constant The operator key in the condition: filter[lorem][condition][<operator>].
EntityCondition::PATH_KEY constant The field key in the filter condition: filter[lorem][condition][<field>].
EntityCondition::validate protected static function Validates the filter has the required fields.
EntityCondition::value public function The value against which the condition should be evaluated.
EntityCondition::VALUE_KEY constant The value key in the filter condition: filter[lorem][condition][<value>].
EntityCondition::__construct public function Constructs a new EntityCondition object.