- Issue created by @nicxvan
- πΊπΈUnited States nicxvan
I have attached a list of all of the preprocess functions in core.
- Status changed to Active
5 days ago 1:12am 11 April 2025 - π¬π§United Kingdom catch
π Explicitly register template_preprocess callbacks in hook_theme() Postponed is in.
- π¨πSwitzerland berdir Switzerland
About 110, some already converted now.
I'd prefer splitting this a bit, thoughts:
* One for remaining bits in core/includes? (32, including already convered ones)
* one for views + views_ui (about 25)
* one for system (13)
* one for the remaining ones ? (110 - 32 - 25 -13 = 40)last chunk still seems pretty big, so maybe split out those that have 4 or more on their own (update, image, file). they all also have include files that can then be removed completely.
For modules, what I'd like to do is move their hook_theme() + the preprocess callbacks into a new ThemeHooks or ${Module}ThemeHooks, that does make it a bit bigger though, but otherwise we have to move it again.
- πΊπΈUnited States nicxvan
I'd vote for splitting it along the 4 lines you mentioned.
Let's move them to ${Module}ThemeHooks, having files called the same is already causing issues finding the right file.
Let's hold off on splitting the last chunk until we get a look at it, but if anything obvious pops up we can split those out to a new issue pretty easily.
- π¨πSwitzerland berdir Switzerland
Might need to split this up into more chunks. With deprecations, reflowing of the code and all those references in templates, it's a lot of changes, already at 530 insertions(+), 314 deletions(-) and only did the part of theme.inc that I put in global ThemePreprocess, there's still field templates, pager, breadcrumb, image, menu and more.
- π¨π¦Canada Charlie ChX Negyesi πCanada
Given the standing issue about removing ModuleServiceProvider I would advise to be cautious about introducing another magic named class
- π§π·Brazil fabiorubim740@outlook.com
fabiorubim740@outlook.com β made their first commit to this issueβs fork.
- π¨πSwitzerland berdir Switzerland
There is no magic class name here. It's just on conventions on how hook classes are named
- πΊπΈUnited States nicxvan
Here is where we are working out the naming convention: π [meta] Clean up hook classes in core Active
- π¨π¦Canada Charlie ChX Negyesi πCanada
Sorry for the misunderstanding: I thought you are converting hooks by themes.
- πΊπΈUnited States nicxvan
That's on the roadmap but this is only about template preprocess hook after π Explicitly register template_preprocess callbacks in hook_theme() Postponed