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

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

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::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::$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;

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::getLinkDefaults

public BookManagerInterface::getLinkDefaults($nid) Returns an array with default values for a book page's menu link. Parameters string|int $nid: The ID of the node whose menu link is being created. Return value array The default values for the menu link. File core/modules/book/src/BookManagerInterface.php, line 208 Class BookManagerInterface Provides an interface defining a book manager. Namespace Drupal\book Code public function getLinkDefaults($nid);

BookManagerInterface::getTableOfContents

public BookManagerInterface::getTableOfContents($bid, $depth_limit, array $exclude = array()) Returns an array of book pages in table of contents order. Parameters int $bid: The ID of the book whose pages are to be listed. int $depth_limit: Any link deeper than this value will be excluded (along with its children). array $exclude: (optional) An array of menu link ID values. Any link whose menu link ID is in this array will be excluded (along with its children). Defaults to an empty array. Retu

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);