protected function EntityTestStorageController::buildPropertyQuery

Overrides Drupal\Core\Entity\DatabaseStorageController::buildPropertyQuery().

Overrides DatabaseStorageController::buildPropertyQuery

File

drupal/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php, line 26
Definition of Drupal\entity_test\EntityTestStorageController.

Class

EntityTestStorageController
Defines the controller class for the test entity.

Namespace

Drupal\entity_test

Code

protected function buildPropertyQuery(QueryInterface $entity_query, array $values) {

  // @todo We should not be using a condition to specify whether conditions
  // apply to the default language or not. We need to move this to a
  // separate parameter during the following API refactoring.
  // Default to the original entity language if not explicitly specified
  // otherwise.
  if (!array_key_exists('default_langcode', $values)) {
    $values['default_langcode'] = 1;
  }
  elseif ($values['default_langcode'] === NULL) {
    unset($values['default_langcode']);
  }
  parent::buildPropertyQuery($entity_query, $values);
}