You are here

public function ContentEntityStorageTrait::loadByProperties in Multiversion 8.2

Same name and namespace in other branches
  1. 8 src/Entity/Storage/ContentEntityStorageTrait.php \Drupal\multiversion\Entity\Storage\ContentEntityStorageTrait::loadByProperties()
2 calls to ContentEntityStorageTrait::loadByProperties()
ContentEntityStorageTrait::save in src/Entity/Storage/ContentEntityStorageTrait.php
MenuLinkContentStorage::delete in src/Entity/Storage/Sql/MenuLinkContentStorage.php
Deletes permanently saved entities.

File

src/Entity/Storage/ContentEntityStorageTrait.php, line 139

Class

ContentEntityStorageTrait

Namespace

Drupal\multiversion\Entity\Storage

Code

public function loadByProperties(array $values = []) {

  // Build a query to fetch the entity IDs.
  $entity_query = $this
    ->getQuery();
  $entity_query
    ->useWorkspace($this
    ->getWorkspaceId());
  $entity_query
    ->accessCheck(FALSE);
  $this
    ->buildPropertyQuery($entity_query, $values);
  $result = $entity_query
    ->execute();
  return $result ? $this
    ->loadMultiple($result) : [];
}