function MenuTreeStorage::loadAllOriginals

Loads all original link data for a set of IDs without unserialization.

This is used during rebuild() to batch-load existing links instead of querying individually in doSave().

Parameters

array $ids: The link IDs to load.

Return value

array An array of link data keyed by ID. Values are raw database rows (not unserialized) for comparison with preSave() output.

1 call to MenuTreeStorage::loadAllOriginals()
MenuTreeStorage::rebuild in core/lib/Drupal/Core/Menu/MenuTreeStorage.php
Rebuilds the stored menu link definitions.

File

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

Class

MenuTreeStorage
Provides a menu tree storage using the database.

Namespace

Drupal\Core\Menu

Code

protected function loadAllOriginals(array $ids) : array {
  $query = $this->connection
    ->select($this->table, NULL, $this->options);
  $query->fields($this->table);
  $query->condition('id', $ids, 'IN');
  return $this->safeExecuteSelect($query)
    ->fetchAllAssoc('id', FetchAs::Associative);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.