Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291155

Investigate adding a _view hook for blocks and use that to set contextual links rather than in a _view_alter hook

$
0
0

Follow up for #1871772: Convert custom blocks to content entities

Problem/Motivation

+++ b/core/modules/block/custom_block/custom_block.module
@@ -53,3 +157,161 @@ function theme_custom_block_block($variables) {
+function custom_block_block_view_alter(array &$build, Block $block) {
+ // Add contextual links for custom blocks.
For adding stuff to block views, we should have a _view hook that is not a _view_alter hook. I don't know whether that exists or not, but in case it does not, we need one (and this one should be converted). Potential follow-up issue.

Proposed resolution

Investigate a hook_block_view() hook and use it for contextual links in custom_block instead of hook_vlock_view_alter().

Remaining tasks

Investigate hook
Update custom_block.module


Viewing all articles
Browse latest Browse all 291155

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>