ConditionBase.php 510 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace Drupal\Core\Entity\Query;
  3. /**
  4. * Defines a common base class for all entity condition implementations.
  5. */
  6. abstract class ConditionBase extends ConditionFundamentals implements ConditionInterface {
  7. /**
  8. * {@inheritdoc}
  9. */
  10. public function condition($field, $value = NULL, $operator = NULL, $langcode = NULL) {
  11. $this->conditions[] = [
  12. 'field' => $field,
  13. 'value' => $value,
  14. 'operator' => $operator,
  15. 'langcode' => $langcode,
  16. ];
  17. return $this;
  18. }
  19. }