Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Oct 2013 at 09:58 UTC
Updated:
9 Dec 2015 at 22:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
xanoThe patch updates a code comment and removes two code usages in phptemplate.engine and twig.engine as I couldn't find any invocation of those hooks, and HEAD is not currently broken.
Comment #3
swentel commentedWell, the init hooks in the theme engines aren't gone. One could argue they are poorly named, but they are called from _drupal_theme_initialize()
Comment #4
internetdevels commentedUpdated patch.
Comment #5
xano4: drupal-remove-references-to-hook_init-2122087-4.patch queued for re-testing.
Comment #6
tstoecklerCan we add a @see to _drupal_theme_initialize() ? That would be incredibly helpful.
Comment #7
berdirSee also the changes happening in #340723: Make modules and installation profiles only require .info.yml files, the passed argument is no longer a stdClass. But it's probably better to wait with this until that issue has been committed to avoid unnecessary conflicts/re-rolls.
Comment #8
sunhook_init()is part of the Theme Engine API — a crucial part even.It would probably be best to establish documentation for this callback (not hook) in
/core/modules/system/theme.api.phpAt least, that is the API documentation file that documents all theme related callbacks and hooks. (I don't think we ever had proper API docs for theme engines.)
Closely related: #1685492: Convert theme engines into services
Comment #9
tim.plunkettSee also #1332068: ENGINE_render_template() and ENGINE_extension() are undocumented
Comment #10
star-szrThis is docs only so it's still viable for RC. Needs a reroll - phptemplate is gone but nyan_cat_init() is in :)
Comment #11
alvar0hurtad0that's the reroll.
Comment #12
subhojit777Patch seems ok to me. Thanks!
Comment #13
catchShouldn't the type hint be on the Extension class?
Comment #14
star-szrYeah and "Theme template object" doesn't seem right either anymore.
Comment #15
rakesh.gectcrI have done the following changes
Comment #16
rakesh.gectcrComment #17
catchComment #18
star-szrTheme template object still seems wrong, it's an extension object. So maybe something like "The theme extension object."?
Thanks.
Comment #19
rakesh.gectcr@Cottser
I updated to
Comment #20
rakesh.gectcrComment #21
lauriiiThe wording could be just simply "Includes .theme file from themes." because I feel like the information where its being loaded is more important than information what .theme file is.
Comment #22
snehi commentedDone as stated by #21
Comment #23
lauriiiLooks good for me! Thanks @snehi!
Comment #24
alexpottHmmm... the twig_init function seems a bit pointless no?
Couldn't...
be the following code instead...
I think we should consider refactoring this as theme engine loading was some of the last work we did before RC.
Is there a case where the $theme_engine . '_init' function will be more complex?
Comment #25
joelpittet@alexpott I think you are totally right. This is still RTBC as such but I've opened up a follow-up so that we can refactor the ENGINE_init to load.
Doubtful we can do that change in 8.0.1 as it's not a bug, but this one we can.
Comment #27
catchCommitted/pushed to 8.1.x and cherry-picked to 8.0.x. Thanks!