Problem/Motivation
Instead of accessing the node from the route match core/modules/book/src/Plugin/Block/BookNavigationBlock.php could use context as well,
see #2575827-7: Use RouteMatch instead of request attributes in book navigation block
Proposed resolution
Implement that
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | core-2781111-22.patch | 1.47 KB | akalam |
Issue fork drupal-2781111
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Issue fork book-2781111
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #15
quietone commentedThis extension is being deprecated, see #3376070: [Meta] Tasks to deprecate Book module. It will be removed from core and moved to a contrib project, #3376101: [11.x] [Meta] Tasks to remove Book.
This is now Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.
This issue may be re-opened if it can be considered critical, If unsure, re-open the issue and ask in a comment.
Comment #20
tonibarbera commentedI've created a patch to have context in the NavigationBlock.
Comment #21
akalam commentedRe-rolled against core 10.2
Comment #22
akalam commentedUploaded a new version of the patch to use EntityContextDefinition instead of ContextDefinition, otherwise there's an error:
AssertionError: assert(!str_starts_with($data_type, 'entity:') || $this instanceof EntityContextDefinition) in core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php
Comment #23
smustgrave commentedComment #24
smustgrave commentedComment #27
smustgrave commented