MenuTreeStorage::loadFullMultiple

protected MenuTreeStorage::loadFullMultiple(array $ids)

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.

File

core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 741

Class

MenuTreeStorage
Provides a menu tree storage using the database.

Namespace

Drupal\Core\Menu

Code

protected function loadFullMultiple(array $ids) {
  $query = $this->connection->select($this->table, $this->options);
  $query->fields($this->table);
  $query->condition('id', $ids, 'IN');
  $loaded = $this->safeExecuteSelect($query)->fetchAllAssoc('id', \PDO::FETCH_ASSOC);
  foreach ($loaded as &$link) {
    foreach ($this->serializedFields() as $name) {
      if (isset($link[$name])) {
        $link[$name] = unserialize($link[$name]);
      }
    }
  }
  return $loaded;
}
doc_Drupal
2016-10-29 09:27:39
Comments
Leave a Comment

Please login to continue.