W3cubDocs

/Drupal 8

class MenuActiveTrail

Provides the default implementation of the active menu trail service.

It uses the current route name and route parameters to compare with the ones of the menu links.

Hierarchy

File

core/lib/Drupal/Core/Menu/MenuActiveTrail.php, line 16

Namespace

Drupal\Core\Menu

Members

Name Modifiers Type Description
CacheCollector::$cache protected property The cache backend that should be used.
CacheCollector::$cacheCreated protected property Stores the cache creation time.
CacheCollector::$cacheInvalidated protected property Flag that indicates of the cache has been invalidated.
CacheCollector::$cacheLoaded protected property Indicates if the collected cache was already loaded.
CacheCollector::$cid protected property The cache id that is used for the cache entry.
CacheCollector::$keysToPersist protected property An array of keys to add to the cache on service termination.
CacheCollector::$keysToRemove protected property An array of keys to remove from the cache on service termination.
CacheCollector::$lock protected property The lock backend that should be used.
CacheCollector::$storage protected property Storage for the data itself.
CacheCollector::$tags protected property A list of tags that are used for the cache entry.
CacheCollector::clear public function Clears the collected cache entry. Overrides CacheCollectorInterface::clear
CacheCollector::delete public function Deletes the element. Overrides CacheCollectorInterface::delete
CacheCollector::destruct public function Performs destruct operations. Overrides DestructableInterface::destruct
CacheCollector::get public function Gets value from the cache. Overrides CacheCollectorInterface::get
CacheCollector::has public function Returns whether data exists for this key. Overrides CacheCollectorInterface::has
CacheCollector::invalidateCache protected function Invalidate the cache.
CacheCollector::lazyLoadCache protected function Loads the cache if not already done.
CacheCollector::normalizeLockName protected function Normalizes a cache ID in order to comply with database limitations.
CacheCollector::persist protected function Flags an offset value to be written to the persistent cache.
CacheCollector::reset public function Resets the local cache. Overrides CacheCollectorInterface::reset
CacheCollector::set public function Implements \Drupal\Core\Cache\CacheCollectorInterface::set(). Overrides CacheCollectorInterface::set
CacheCollector::updateCache protected function Writes a value to the persistent cache immediately.
MenuActiveTrail::$menuLinkManager protected property The menu link plugin manager.
MenuActiveTrail::$routeMatch protected property The route match object for the current page.
MenuActiveTrail::doGetActiveTrailIds protected function Helper method for ::getActiveTrailIds().
MenuActiveTrail::getActiveLink public function Fetches a menu link which matches the route name, parameters and menu name. Overrides MenuActiveTrailInterface::getActiveLink
MenuActiveTrail::getActiveTrailIds public function This implementation caches all active trail IDs per route match for *all* menus whose active trails are calculated on that page. This ensures 1 cache get for all active trails per page load, rather than N. Overrides MenuActiveTrailInterface::getActiveTrailIds
MenuActiveTrail::getCid protected function Overrides CacheCollector::getCid
MenuActiveTrail::resolveCacheMiss protected function Overrides CacheCollector::resolveCacheMiss
MenuActiveTrail::__construct public function Constructs a \Drupal\Core\Menu\MenuActiveTrail object. Overrides CacheCollector::__construct

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Menu!MenuActiveTrail.php/class/MenuActiveTrail/8.1.x