You are here

protected function MongodbMenuTreeStorage::loadFullMultiple in MongoDB 8

Loads all table fields for multiple menu link definitions by ID.

Parameters

array $ids: The IDs to load.

Return value

array The loaded menu link definitions.

Overrides MenuTreeStorage::loadFullMultiple

File

src/MongodbMenuTreeStorage.php, line 267
Contains \Drupal\mongodb\MongodbMenuTreeStorage .

Class

MongodbMenuTreeStorage

Namespace

Drupal\mongodb

Code

protected function loadFullMultiple(array $ids) {
  $loaded = [];
  $query['value.id']['$in'] = array_values($ids);
  foreach ($this
    ->mongoCollection()
    ->find($query) as $link) {
    $link = $link['value'];
    foreach ($this
      ->serializedFields() as $name) {
      $link[$name] = unserialize($link[$name]);
    }
    $loaded[$link['id']] = $link;
  }
  return $loaded;
}