forked from kriswallsmith/assetic
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated twig extension for twig 2.11
- Loading branch information
Showing
7 changed files
with
19 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<?php namespace Assetic\Extension\Twig; | ||
|
||
class AsseticFilterFunction extends \Twig_SimpleFunction | ||
use Twig\TwigFunction; | ||
|
||
class AsseticFilterFunction | ||
{ | ||
public function __construct($name, $options = array()) | ||
public static function make(AsseticExtension $extension, $name, $options = []) | ||
{ | ||
parent::__construct($name, null, array_merge($options, array( | ||
'needs_environment' => false, | ||
'needs_context' => false, | ||
'node_class' => '\Assetic\Extension\Twig\AsseticFilterNode', | ||
))); | ||
return new TwigFunction($name, function ($input, array $options) use ($extension, $name) { | ||
return $extension->getFilterInvoker($name)->invoke($input, $options); | ||
}, $options); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
135 changes: 0 additions & 135 deletions
135
tests/Assetic/Test/Extension/Twig/TwigFormulaLoaderTest.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters