You are here

protected function FormAssemblyEntityController::buildPropertyQuery in FormAssembly 7

Builds an entity query.

Adpated from patch for EntityStorageControllerInterface::loadByProperties() posted at https://www.drupal.org/files/1184272-77.patch

Parameters

'Drupal\entity\EntityFieldQuery' $entity_query: EntityFieldQuery instance.

array $values: An associative array of properties of the entity, where the keys are the property names and the values are the values those properties must have.

1 call to FormAssemblyEntityController::buildPropertyQuery()
FormAssemblyEntityController::loadByProperties in includes/FormAssemblyEntityController.php
Selects entities to load by property.

File

includes/FormAssemblyEntityController.php, line 111
Provides a controller building upon the Entity API but with some additional display and search.

Class

FormAssemblyEntityController
@file Provides a controller building upon the Entity API but with some additional display and search.

Code

protected function buildPropertyQuery(EntityFieldQuery $entity_query, array $values) {
  foreach ($values as $name => $value) {
    $entity_query
      ->propertyCondition($name, $value);
  }
}