You are here

protected function StringMongoDBStorage::getFindArray in MongoDB 8

Parameters

array $conditions:

Return value

array

2 calls to StringMongoDBStorage::getFindArray()
StringMongoDBStorage::findString in mongodb_locale/src/StringStorage.php
Loads a string source object, fast query.
StringMongoDBStorage::getFilterFindArray in mongodb_locale/src/StringStorage.php
Creates a MongoDB find array based on conditions and filters.

File

mongodb_locale/src/StringStorage.php, line 359

Class

StringMongoDBStorage

Namespace

Drupal\mongodb_locale

Code

protected function getFindArray(array $conditions) {
  $find = array();
  if (isset($conditions['lid'])) {
    $find += $this
      ->getIdCriteria($conditions['lid']);
  }
  if (isset($conditions['context'])) {
    $find['context'] = $conditions['context'];
  }
  if (isset($conditions['type'])) {
    $find['location.type'] = $conditions['type'];
    return $find;
  }
  return $find;
}