protected function MenuTreeStorage::loadFullMultiple in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::loadFullMultiple()
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.
2 calls to MenuTreeStorage::loadFullMultiple()
- MenuTreeStorage::loadFull in core/
lib/ Drupal/ Core/ Menu/ MenuTreeStorage.php - Loads all table fields, not just those that are in the plugin definition.
- MenuTreeStorage::purgeMultiple in core/
lib/ Drupal/ Core/ Menu/ MenuTreeStorage.php - Purges multiple menu links that no longer exist.
File
- core/
lib/ Drupal/ Core/ Menu/ MenuTreeStorage.php, line 758
Class
- MenuTreeStorage
- Provides a menu tree storage using the database.
Namespace
Drupal\Core\MenuCode
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;
}