function MenuTreeStorage::loadFullMultiple
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::loadFullMultiple()
- 10 core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::loadFullMultiple()
- 11.x 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 762
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, NULL, $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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.