ConditionBase.php

Same filename in other branches
  1. 9 core/lib/Drupal/Core/Entity/Query/ConditionBase.php
  2. 8.9.x core/lib/Drupal/Core/Entity/Query/ConditionBase.php
  3. 11.x core/lib/Drupal/Core/Entity/Query/ConditionBase.php

Namespace

Drupal\Core\Entity\Query

File

core/lib/Drupal/Core/Entity/Query/ConditionBase.php

View source
<?php

namespace Drupal\Core\Entity\Query;


/**
 * Defines a common base class for all entity condition implementations.
 */
abstract class ConditionBase extends ConditionFundamentals implements ConditionInterface {
    
    /**
     * {@inheritdoc}
     */
    public function condition($field, $value = NULL, $operator = NULL, $langcode = NULL) {
        $this->conditions[] = [
            'field' => $field,
            'value' => $value,
            'operator' => $operator,
            'langcode' => $langcode,
        ];
        return $this;
    }

}

Classes

Title Deprecated Summary
ConditionBase Defines a common base class for all entity condition implementations.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.