ConditionBase.php 639 Bytes
Newer Older
1 2 3 4
<?php

/**
 * @file
5
 * Contains \Drupal\Core\Entity\Query\ConditionBase.
6 7 8 9 10
 */

namespace Drupal\Core\Entity\Query;

/**
11
 * Defines a common base class for all entity condition implementations.
12
 */
13
abstract class ConditionBase extends ConditionFundamentals implements ConditionInterface {
14 15

  /**
16
   * Implements \Drupal\Core\Entity\Query\ConditionInterface::compile().
17 18 19 20 21 22 23 24 25 26 27 28
   */
  public function condition($field, $value = NULL, $operator = NULL, $langcode = NULL) {
    $this->conditions[] = array(
      'field' => $field,
      'value' => $value,
      'operator' => $operator,
      'langcode' => $langcode,
    );

    return $this;
  }
}