Helpers
For those of you that have looked through the code of the Helpers Module on GitHub, you should've stumbled upon the HooksHelpersTrait
and the AssetsHelpersTrait
traits. They provide methods for generating programmatically hook tags and asset handles, respectively.
The Foundations Module extends upon the methods defined in those two traits by taking into account the role of the using class. Specifically, it takes into account whether the using class implements any of the PluginComponentInterface
, PluginAwareInterface
, or PluginInterface
interfaces in this order.
You can check out the enhanced versions of these traits here. It's recommended to use them every time you work with hooks and assets in order have a consistent naming scheme.
Last updated