MenuTreeStorage::resetDefinitions

public MenuTreeStorage::resetDefinitions() Clears all definitions cached in memory. Overrides MenuTreeStorageInterface::resetDefinitions File core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 137 Class MenuTreeStorage Provides a menu tree storage using the database. Namespace Drupal\Core\Menu Code public function resetDefinitions() { $this->definitions = array(); }

MenuTreeStorage::rebuild

public MenuTreeStorage::rebuild(array $definitions) Rebuilds the stored menu link definitions. Links that saved by passing definitions into this method must be included on all future calls, or they will be purged. This allows for automatic cleanup e.g. when modules are uninstalled. Parameters array $definitions: The new menu link definitions. Overrides MenuTreeStorageInterface::rebuild File core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 144 Class MenuTreeStorage Provides a menu tree

MenuTreeStorage::purgeMultiple

protected MenuTreeStorage::purgeMultiple(array $ids) Purges multiple menu links that no longer exist. Parameters array $ids: An array of menu link IDs. File core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 213 Class MenuTreeStorage Provides a menu tree storage using the database. Namespace Drupal\Core\Menu Code protected function purgeMultiple(array $ids) { $loaded = $this->loadFullMultiple($ids); foreach ($loaded as $id => $link) { if ($link['has_children']) {

MenuTreeStorage::preSave

protected MenuTreeStorage::preSave(array &$link, array $original) Fills in all the fields the database save needs, using the link definition. Parameters array $link: The link definition to be updated. array $original: The link definition before the changes. May be empty if not found. Return value array The values which will be stored. Throws \Drupal\Component\Plugin\Exception\PluginException Thrown when the specific depth exceeds the maximum. File core/lib/Drupal/Core/Menu/MenuTreeStorag

MenuTreeStorage::prepareLink

protected MenuTreeStorage::prepareLink(array $link, $intersect = FALSE) Prepares a link by unserializing values and saving the definition. Parameters array $link: The data loaded in the query. bool $intersect: If TRUE, filter out values that are not part of the actual definition. Return value array The prepared link data. File core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 627 Class MenuTreeStorage Provides a menu tree storage using the database. Namespace Drupal\Core\Menu Code

MenuTreeStorage::moveChildren

protected MenuTreeStorage::moveChildren($fields, $original) Re-parents a link's children when the link itself is moved. Parameters array $fields: The changed menu link. array $original: The original menu link. File core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 512 Class MenuTreeStorage Provides a menu tree storage using the database. Namespace Drupal\Core\Menu Code protected function moveChildren($fields, $original) { $query = $this->connection->update($this->table, $

MenuTreeStorage::menuNameInUse

public MenuTreeStorage::menuNameInUse($menu_name) Determines whether a specific menu name is used in the tree. Parameters string $menu_name: The menu name. Return value bool Returns TRUE if the given menu name is used, otherwise FALSE. Overrides MenuTreeStorageInterface::menuNameInUse File core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 1019 Class MenuTreeStorage Provides a menu tree storage using the database. Namespace Drupal\Core\Menu Code public function menuNameInUse($menu_n

MenuTreeStorage::MAX_DEPTH

The maximum depth of a menu links tree. File core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 23 Class MenuTreeStorage Provides a menu tree storage using the database. Namespace Drupal\Core\Menu Code const MAX_DEPTH = 9;

MenuTreeStorage::maxDepth

public MenuTreeStorage::maxDepth() The maximum depth of tree the storage implementation supports. Return value int The maximum depth. Overrides MenuTreeStorageInterface::maxDepth File core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 130 Class MenuTreeStorage Provides a menu tree storage using the database. Namespace Drupal\Core\Menu Code public function maxDepth() { return static::MAX_DEPTH; }

MenuTreeStorage::loadTreeData

public MenuTreeStorage::loadTreeData($menu_name, MenuTreeParameters $parameters) Loads a menu link tree from the storage. This function may be used build the data for a menu tree only, for example to further massage the data manually before further processing happens. MenuLinkTree::checkAccess() needs to be invoked afterwards. The tree order is maintained using an optimized algorithm, for example by storing each parent in an individual field, see https://www.drupal.org/node/141866 for more deta