Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
You can't really nice dynamically register "appears_on" for local action plugins.
Proposed resolution
3 ... 2 ... 1 ... Discuss!
Remaining tasks
API changes
(API changes/additions that would affect module, install profile, and theme developers, including examples of before/after code if appropriate.)
Related Issues
#2058321: Move the 'place block' UI into the block listing
#2050227: Add local action plugin deriver to use YAML discovery for static definitions
Comments
Comment #1
tim.plunkettTagging
Comment #2
xjmFor a bit more context, here's what it takes to put an "Add custom block" button on each theme subtab of
admin/structure/block
:Comment #3
dawehnerIf we switch to yml based discovery we safe quite a lot of all the use statements.
The main reason why this seems so complex is that we went with allowing appearance based upon routes instead of paths.
This will become problematic if you add a new route you want this plugin to appear on. Previously it worked automatically because it was based upon the path, but now you need to alter it.
Comment #3.0
dawehnerUpdated issue summary.