New issue
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
Twig Extension, remove type array, add .twig ext, add none filter #26
Conversation
PHPStorm interprets .tpl as Smarty templates and doesn't support the TwigPlugin. The to use templates with .twig extension it needs to be part of the array
I'm not inclined to reject this PR but interested in why the removal of the array type hint. |
Hi |
The filter returns and stops further filtering propagation. Use the filter in CakePHP/Twig in combination with Helper functions returning Objects instead of strings. E.g. $this->Html->addCrumb('Some Crumb') becomes {{ Html.addCrumb('Some Crumb') | none }}
@@ -40,6 +40,7 @@ public function getFilters() | |||
new \Twig_SimpleFilter('isMultibyte', 'Cake\Utility\String::isMultibyte'), | |||
new \Twig_SimpleFilter('utf8', 'Cake\Utility\String::utf8'), | |||
new \Twig_SimpleFilter('ascii', 'Cake\Utility\String::ascii'), | |||
new \Twig_SimpleFilter('none', function($string) {return;}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you fix the code style issue here? https://travis-ci.org/WyriHaximus/TwigView/jobs/144661875#L224-L232
Right that makes sense, I'll merge this PR and tag a new release after you fixed the code style issue. If you don't prefer to do that I gladly merge it and do it no self 😄 . |
Hej, all done. Cheers |
Thanks! I'll tag it later today 👍 |
No description provided.