Closed stormwild closed 7 years ago
I'm not certain that this is really the place to put it, it's certainly already possible by using a container and the manual instantiation vs. the factory instantiation. The problem you will start to run into is where does that stop for hooking everything?
Basically the factories should be mostly interchangeable and adding implementation logic on each one can lead to highly customized factories that ultimately do several things that are just simply proxying methods.
On one hand, it makes configurability via configuration far quicker but on the other hand, it makes for more of a maintainability nightmare - especially for future versions. I would say customized handling such as this should be done manually. But feel free to disagree :)
i think the problem is that right now there is no way to configure the PlatesEngine
because it's not accessible anywhere, and the renderer factory always instantiate a new one rather than pulling one from the container.
so as it stands, the implementation is quite closed, and to customize the engine one would need to replace the whole renderer factory, which is odd.
I would say customized handling such as this should be done manually.
I understand, I was hoping it would have been good to have it enabled for the skeleton by default.
While I get the objections that @mwillbanks raises, the fact is that "asset" helpers are already enabled by default in both the twig and zend-view implementations. As such, we likely should enable them for plates.
I see two ways to do so:
Anybody want to start a pull request? On Dec 12, 2015 10:09 PM, "Alexander R Torrijos" notifications@github.com wrote:
I would say customized handling such as this should be done manually.
I understand, I was hoping it would have been good to have it enabled for the skeleton by default.
— Reply to this email directly or view it on GitHub https://github.com/zendframework/zend-expressive-platesrenderer/issues/3#issuecomment-164220908 .
Proposal to refactor PlatesRendererFactory to enable asset extension.
This will allow plates-layout.phtml in zend-expressive-skeleton to reference assets similar to:
Where the assets path is configured in templates.global as: