function MenuTreeStorage::loadFull

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::loadFull()
  2. 10 core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::loadFull()
  3. 11.x core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::loadFull()

Loads all table fields, not just those that are in the plugin definition.

Parameters

string $id: The menu link ID.

Return value

array The loaded menu link definition or an empty array if not be found.

7 calls to MenuTreeStorage::loadFull()
MenuTreeStorage::delete in core/lib/Drupal/Core/Menu/MenuTreeStorage.php
Deletes a menu link definition from the storage.
MenuTreeStorage::findParent in core/lib/Drupal/Core/Menu/MenuTreeStorage.php
Loads the parent definition if it exists.
MenuTreeStorage::getAllChildIds in core/lib/Drupal/Core/Menu/MenuTreeStorage.php
Loads all the IDs for menu links that are below the given ID.
MenuTreeStorage::getSubtreeHeight in core/lib/Drupal/Core/Menu/MenuTreeStorage.php
Finds the height of a subtree rooted by the given ID.
MenuTreeStorage::loadLinks in core/lib/Drupal/Core/Menu/MenuTreeStorage.php
Loads links in the given menu, according to the given tree parameters.

... See full list

File

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

Class

MenuTreeStorage
Provides a menu tree storage using the database.

Namespace

Drupal\Core\Menu

Code

protected function loadFull($id) {
    $loaded = $this->loadFullMultiple([
        $id,
    ]);
    return $loaded[$id] ?? [];
}

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