Skip to content
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

Merged
merged 6 commits into from
Jul 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Lib/Twig/Extension/Strings.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ 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;
}),
];
}

Expand Down
4 changes: 2 additions & 2 deletions src/Lib/Twig/Node/Cell.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Cell extends \Twig_Node implements \Twig_NodeOutputInterface
* Constructor.
*
* @param boolean $assign Assign or echo.
* @param array $variable Variable to assign to.
* @param mixed $variable Variable to assign to.
* @param \Twig_Node_Expression $name Name.
* @param \Twig_Node_Expression $data Data array.
* @param \Twig_Node_Expression $options Options array.
Expand All @@ -39,7 +39,7 @@ class Cell extends \Twig_Node implements \Twig_NodeOutputInterface
*/
public function __construct(
$assign,
array $variable,
$variable,
\Twig_Node_Expression $name,
\Twig_Node_Expression $data = null,
\Twig_Node_Expression $options = null,
Expand Down
1 change: 1 addition & 0 deletions src/View/TwigView.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class TwigView extends View
protected $extensions = [
self::EXT,
'.ctp',
'.twig',
];

/**
Expand Down