BookNavigationCacheContext::__construct

public BookNavigationCacheContext::__construct(RequestStack $request_stack) Constructs a new BookNavigationCacheContext service. Parameters \Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack. File core/modules/book/src/Cache/BookNavigationCacheContext.php, line 40 Class BookNavigationCacheContext Defines the book navigation cache context service. Namespace Drupal\book\Cache Code public function __construct(RequestStack $request_stack) { $this->reques

BookNavigationCacheContext::getLabel

public static BookNavigationCacheContext::getLabel() Returns the label of the cache context. Return value string The label of the cache context. Overrides CacheContextInterface::getLabel File core/modules/book/src/Cache/BookNavigationCacheContext.php, line 47 Class BookNavigationCacheContext Defines the book navigation cache context service. Namespace Drupal\book\Cache Code public static function getLabel() { return t("Book navigation"); }

BookNavigationCacheContext::getContext

public BookNavigationCacheContext::getContext() Returns the string representation of the cache context. A cache context service's name is used as a token (placeholder) cache key, and is then replaced with the string returned by this method. Return value string The string representation of the cache context. Overrides CacheContextInterface::getContext File core/modules/book/src/Cache/BookNavigationCacheContext.php, line 54 Class BookNavigationCacheContext Defines the book navigation cache

BookNavigationCacheContext::getCacheableMetadata

public BookNavigationCacheContext::getCacheableMetadata() Gets the cacheability metadata for the context. There are three valid cases for the returned CacheableMetadata object: An empty object means this can be optimized away safely. A max-age of 0 means that this context can never be optimized away. It will never bubble up and cache tags will not be used. Any non-zero max-age and cache tags will bubble up into the cache item if this is optimized away to allow for invalidation if the context va

BookNavigationCacheContext::$requestStack

The request stack. Type: \Symfony\Component\HttpFoundation\RequestStack File core/modules/book/src/Cache/BookNavigationCacheContext.php, line 32 Class BookNavigationCacheContext Defines the book navigation cache context service. Namespace Drupal\book\Cache Code protected $requestStack;

BookNavigationCacheContext

Defines the book navigation cache context service. Cache context ID: 'route.book_navigation'. This allows for book navigation location-aware caching. It depends on: whether the current route represents a book node at all and if so, where in the book hierarchy we are This class is container-aware to avoid initializing the 'book.manager' service when it is not necessary. Hierarchy class \Drupal\book\Cache\BookNavigationCacheContext implements CacheContextInterface, ContainerAwareInterface uses

BookManagerInterface::updateOutline

public BookManagerInterface::updateOutline(NodeInterface $node) Handles additions and updates to the book outline. This common helper function performs all additions and updates to the book outline through node addition, node editing, node deletion, or the outline tab. Parameters \Drupal\node\NodeInterface $node: The node that is being saved, added, deleted, or moved. Return value bool TRUE if the book link was saved; FALSE otherwise. File core/modules/book/src/BookManagerInterface.php, line

BookManagerInterface::saveBookLink

public BookManagerInterface::saveBookLink(array $link, $new) Saves a single book entry. Parameters array $link: The link data to save. bool $new: Is this a new book. Return value array The book data of that node. File core/modules/book/src/BookManagerInterface.php, line 197 Class BookManagerInterface Provides an interface defining a book manager. Namespace Drupal\book Code public function saveBookLink(array $link, $new);

BookManagerInterface::loadBookLinks

public BookManagerInterface::loadBookLinks($nids, $translate = TRUE) Loads multiple book entries. The entries of a book entry is documented in \Drupal\book\BookOutlineStorageInterface::loadMultiple. If $translate is TRUE, it also checks access ('access' key) and loads the title from the node itself. Parameters int[] $nids: An array of nids to load. bool $translate: If TRUE, set access, title, and other elements. Return value array[] The book data of each node keyed by NID. See also \Drupal\b

BookManagerInterface::loadBookLink

public BookManagerInterface::loadBookLink($nid, $translate = TRUE) Loads a single book entry. The entries of a book entry is documented in \Drupal\book\BookOutlineStorageInterface::loadMultiple. If $translate is TRUE, it also checks access ('access' key) and loads the title from the node itself. Parameters int $nid: The node ID of the book. bool $translate: If TRUE, set access, title, and other elements. Return value array The book data of that node. See also \Drupal\book\BookOutlineStorageI