public function ConfigStorageController::loadByProperties

Implements Drupal\Core\Entity\EntityStorageControllerInterface::loadByProperties().

Overrides EntityStorageControllerInterface::loadByProperties

File

drupal/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php, line 160
Definition of Drupal\Core\Config\Entity\ConfigStorageController.

Class

ConfigStorageController
Defines the storage controller class for configuration entities.

Namespace

Drupal\Core\Config\Entity

Code

public function loadByProperties(array $values = array()) {
  $entities = $this
    ->load();
  foreach ($values as $key => $value) {
    $entities = array_filter($entities, function ($entity) use ($key, $value) {
      return $value === $entity
        ->get($key);
    });
  }
  return $entities;
}