We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While trying the plugin, I found out I could not use the Helpers name directly as specified in the doc :
{{ Html.css('default.app.css')|raw }}
I had to call them as follows :
{{ _view.Html.css('default.app.css')|raw }}
After digging a bit, I found out that I had to change the TwigView::generateHelperList() method to the following implementation for it to work :
TwigView::generateHelperList()
diff --git a/src/View/TwigView.php b/src/View/TwigView.php index af8bc77..06ed785 100644 --- a/src/View/TwigView.php +++ b/src/View/TwigView.php @@ -164,7 +164,7 @@ protected function getLoader() protected function generateHelperList() { $registry = $this->helpers(); - $helpers = $registry->normalizeArray($this->helpers); + $helpers = $registry->normalizeArray($registry->loaded()); foreach ($helpers as $properties) { list(, $class) = pluginSplit($properties['class']); $this->helperList[$class] = $this->{$class};
I'm working with CakePHP 3.3-beta2 on a PHP 5.5.30 install. I'm loading my Helpers in the initialize() method of my AppView class.
initialize()
Is it ok if I submit a pull request with this change or do you think that could cause issues ?
The text was updated successfully, but these errors were encountered:
Yes please submit a pull request, that will also test it against different CakePHP versions and PHP versions 👍
Sorry, something went wrong.
I opened PR #31
No branches or pull requests
While trying the plugin, I found out I could not use the Helpers name directly as specified in the doc :
I had to call them as follows :
After digging a bit, I found out that I had to change the
TwigView::generateHelperList()
method to the following implementation for it to work :I'm working with CakePHP 3.3-beta2 on a PHP 5.5.30 install.
I'm loading my Helpers in the
initialize()
method of my AppView class.Is it ok if I submit a pull request with this change or do you think that could cause issues ?
The text was updated successfully, but these errors were encountered: