Verified Commit bd142d03 authored by quietone's avatar quietone
Browse files

Issue #3345197 by _shY, pradhumanjain2311, joachim, longwave:...

Issue #3345197 by _shY, pradhumanjain2311, joachim, longwave: loadByProperties() and buildPropertyQuery() should document that you can pass value arrays to get an IN query condition
parent aa55822a
Loading
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -585,8 +585,9 @@ public function restore(EntityInterface $entity) {
   * @param \Drupal\Core\Entity\Query\QueryInterface $entity_query
   *   EntityQuery instance.
   * @param 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.
   *   An associative array where the keys are the property names and the
   *   values are the values those properties must have. If a property takes
   *   multiple values, passing an array of values will produce an IN condition.
   */
  protected function buildPropertyQuery(QueryInterface $entity_query, array $values) {
    foreach ($values as $name => $value) {
+2 −1
Original line number Diff line number Diff line
@@ -111,7 +111,8 @@ public function deleteRevision($revision_id);
   *
   * @param array $values
   *   An associative array where the keys are the property names and the
   *   values are the values those properties must have.
   *   values are the values those properties must have. If a property takes
   *   multiple values, passing an array of values will produce an IN condition.
   *
   * @return \Drupal\Core\Entity\EntityInterface[]
   *   An array of entity objects indexed by their ids.