MenuTreeStorage::getRootPathIds

public MenuTreeStorage::getRootPathIds($id) Returns all the IDs that represent the path to the root of the tree. array( 'p1' => 1, 'p2' => 6, 'p3' => 8, 'p4' => 0, 'p5' => 0, 'p6' => 0, 'p7' => 0, 'p8' => 0, 'p9' => 0 ) Parameters string $id: A menu link ID. Return value array An associative array of IDs with keys equal to values that represents the path from the given ID to the root of the tree. If $id is an ID that exists,

MenuTreeStorage::getMenuNames

public MenuTreeStorage::getMenuNames() Returns the used menu names in the tree storage. Return value array The menu names. Overrides MenuTreeStorageInterface::getMenuNames File core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 1030 Class MenuTreeStorage Provides a menu tree storage using the database. Namespace Drupal\Core\Menu Code public function getMenuNames() { $query = $this->connection->select($this->table, $this->options); $query->addField($this->table,

MenuTreeStorage::getExpanded

public MenuTreeStorage::getExpanded($menu_name, array $parents) Finds expanded links in a menu given a set of possible parents. Parameters string $menu_name: The menu name. array $parents: One or more parent IDs to match. Return value array The menu link IDs that are flagged as expanded in this menu. Overrides MenuTreeStorageInterface::getExpanded File core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 783 Class MenuTreeStorage Provides a menu tree storage using the database. Namespac

MenuTreeStorage::getAllChildIds

public MenuTreeStorage::getAllChildIds($id) Loads all the IDs for menu links that are below the given ID. Parameters string $id: The parent menu link ID. Return value array An unordered array of plugin IDs corresponding to all children. Overrides MenuTreeStorageInterface::getAllChildIds File core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 1051 Class MenuTreeStorage Provides a menu tree storage using the database. Namespace Drupal\Core\Menu Code public function getAllChildIds($id)

MenuTreeStorage::findParent

protected MenuTreeStorage::findParent($link, $original) Loads the parent definition if it exists. Parameters array $link: The link definition to find the parent of. array|false $original: The original link that might be used to find the parent if the parent is not set on the $link, or FALSE if the original could not be loaded. Return value array|false Returns a definition array, or FALSE if no parent was found. File core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 563 Class MenuTreeSto

MenuTreeStorage::findNoLongerExistingLinks

protected MenuTreeStorage::findNoLongerExistingLinks(array $definitions) Find any previously discovered menu links that no longer exist. Parameters array $definitions: The new menu link definitions. Return value array A list of menu link IDs that no longer exist. File core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 1450 Class MenuTreeStorage Provides a menu tree storage using the database. Namespace Drupal\Core\Menu Code protected function findNoLongerExistingLinks(array $definit

MenuTreeStorage::ensureTableExists

protected MenuTreeStorage::ensureTableExists() Checks if the tree table exists and create it if not. Return value bool TRUE if the table was created, FALSE otherwise. Throws \Drupal\Component\Plugin\Exception\PluginException If a database error occurs. File core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 1151 Class MenuTreeStorage Provides a menu tree storage using the database. Namespace Drupal\Core\Menu Code protected function ensureTableExists() { try { if (!$this->co

MenuTreeStorage::doSave

protected MenuTreeStorage::doSave(array $link) Saves a link without clearing caches. Parameters array $link: A definition, according to $definitionFields, for a \Drupal\Core\Menu\MenuLinkInterface plugin. Return value array The menu names affected by the save operation. This will be one menu name if the link is saved to the sane menu, or two if it is saved to a new menu. Throws \Exception Thrown if the storage back-end does not exist and could not be created. \Drupal\Component\Plugin\Excepti

MenuTreeStorage::doFindChildrenRelativeDepth

protected MenuTreeStorage::doFindChildrenRelativeDepth(array $original) Finds the relative depth of this link's deepest child. Parameters array $original: The parent definition used to find the depth. Return value int Returns the relative depth. File core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 436 Class MenuTreeStorage Provides a menu tree storage using the database. Namespace Drupal\Core\Menu Code protected function doFindChildrenRelativeDepth(array $original) { $query = $

MenuTreeStorage::doDeleteMultiple

protected MenuTreeStorage::doDeleteMultiple(array $ids) Purge menu links from the database. Parameters array $ids: A list of menu link IDs to be purged. File core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 1473 Class MenuTreeStorage Provides a menu tree storage using the database. Namespace Drupal\Core\Menu Code protected function doDeleteMultiple(array $ids) { $this->connection->delete($this->table, $this->options) ->condition('id', $ids, 'IN') ->execu