Follow up for #1871772-108: Convert custom blocks to content entities
Problem/Motivation
+++ b/core/modules/block/custom_block/custom_block.pages.inc
@@ -0,0 +1,153 @@
+ return array('#theme' => 'custom_block_add_list', '#content' => $types);
...
+function theme_custom_block_add_list($variables) {
...
+ $output = '
';
I... hrm. We have (minor) wrong "node" class name in there, but I don't really get why the /add callback optionally renders a list of (existing?) custom blocks that may be added - shouldn't that be a different controller/callback?
In any case, do we really need a theme function for that? Can't we make it a simple table or something? :)
In more general terms there is duplication between theme_node_add_list() theme_custom_block_add_list() and theme_item_list().
Proposed resolution
Consolidate theme_node_add_list() and theme_custom_block_add_list().
Remaining tasks
Write the patch.
API changes
Removal of two theme functions.
Comments
Comment #1
sunOr just #type table?
Comment #2
tim.plunkettPlease, let's do this instead of #2025669: Introduce #type 'custom_block_add_list'
Comment #3
tim.plunkettAlso, theme_admin_block_content produces the same result
Comment #6
tim.plunkettNot actively part of the Blocks-Layouts work.
Comment #18
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #19
berdirI think this is essentially a duplicate of #3026221: Unify entity add list theme functions and templates (although older) which I've also closed as duplicate of two other issues, as we do have a generic version of this already, just need to deprecate the custom ones.