Closed (duplicate)
Project:
Drupal core
Version:
8.4.x-dev
Component:
theme system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Dec 2015 at 04:50 UTC
Updated:
17 Feb 2017 at 09:15 UTC
Jump to comment: Most recent
Comments
Comment #2
dawehnerThat sounds really interesting, given that hook_theme() is one of the few left over registry level hooks.
Comment #3
star-szrThis does sound good overall (was just discussing this with a colleague last week) but the scope in the current issue summary sounds too big and vague IMO. I don't think right now most hook_theme would need a class, that should be optional I think, or use the standard pattern we used when replacing other hooks like these (like hook_menu for example).
Can we just start with a straight conversion (with BC)? That or we need more information I think. Thanks!
Comment #4
dawehnerYeah I totally believe we want to do the same as for things like routes, just move the discovery from hook_theme() to a yaml file and done.
Comment #5
hatuhay commentedLooking from a frontend point of view I see to mayor improvements:
YAML declaration
Using something like:
Theme declaration repository
User case
In my case what I needed to achieve is to allow frontend developers to select a theme wrapper for blocks, directly on the block configuration form Block Styles and allow modules and themes to declare new theme wrappers.
To do this I programmed this module Styles API doing something in my understanding should be done by CORE.
On a first stage, both YAML and hook_theme() should coexist with a programmed depreciation deadline for hook_theme().
Comment #9
simon georges commentedSeems to be a duplicate of #2809689: Move hook_theme implementations into yml.