From 98b3a2d9eb9872eb934910b9644d7ac9a5a18eca Mon Sep 17 00:00:00 2001 From: Kris Wallsmith Date: Fri, 1 Apr 2011 11:33:34 -0700 Subject: [PATCH] [AsseticBundle] fixed twig classes for api changes in assetic --- src/Symfony/Bundle/AsseticBundle/Twig/DynamicNode.php | 2 +- .../Bundle/AsseticBundle/Twig/DynamicTokenParser.php | 6 +++--- src/Symfony/Bundle/AsseticBundle/Twig/StaticExtension.php | 2 +- src/Symfony/Bundle/AsseticBundle/Twig/StaticNode.php | 2 +- src/Symfony/Bundle/AsseticBundle/Twig/StaticTokenParser.php | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Bundle/AsseticBundle/Twig/DynamicNode.php b/src/Symfony/Bundle/AsseticBundle/Twig/DynamicNode.php index af39577401db..b17c0d0541d9 100644 --- a/src/Symfony/Bundle/AsseticBundle/Twig/DynamicNode.php +++ b/src/Symfony/Bundle/AsseticBundle/Twig/DynamicNode.php @@ -28,7 +28,7 @@ protected function getAssetUrlNode(\Twig_NodeInterface $body) return new \Twig_Node_Expression_Function( new \Twig_Node_Expression_Name('path', $body->getLine()), new \Twig_Node(array( - new \Twig_Node_Expression_Constant('assetic_'.$this->getAttribute('asset_name'), $body->getLine()), + new \Twig_Node_Expression_Constant('assetic_'.$this->getAttribute('name'), $body->getLine()), )), $body->getLine() ); diff --git a/src/Symfony/Bundle/AsseticBundle/Twig/DynamicTokenParser.php b/src/Symfony/Bundle/AsseticBundle/Twig/DynamicTokenParser.php index 3281c4eec9d1..418b48d50eeb 100644 --- a/src/Symfony/Bundle/AsseticBundle/Twig/DynamicTokenParser.php +++ b/src/Symfony/Bundle/AsseticBundle/Twig/DynamicTokenParser.php @@ -14,14 +14,14 @@ use Assetic\Extension\Twig\AsseticTokenParser; /** - * Parses the {% assets %} tag. + * Parses an Assetic tag. * * @author Kris Wallsmith */ class DynamicTokenParser extends AsseticTokenParser { - static protected function createNode(\Twig_NodeInterface $body, array $sourceUrls, $targetUrl, array $filterNames, $assetName, $debug = false, $lineno = 0, $tag = null) + static protected function createNode(\Twig_NodeInterface $body, array $inputs, array $filters, array $attributes, $lineno = 0, $tag = null) { - return new DynamicNode($body, $sourceUrls, $targetUrl, $filterNames, $assetName, $debug, $lineno, $tag); + return new DynamicNode($body, $inputs, $filters, $attributes, $lineno, $tag); } } diff --git a/src/Symfony/Bundle/AsseticBundle/Twig/StaticExtension.php b/src/Symfony/Bundle/AsseticBundle/Twig/StaticExtension.php index 7de7e643defd..d5889ce01150 100644 --- a/src/Symfony/Bundle/AsseticBundle/Twig/StaticExtension.php +++ b/src/Symfony/Bundle/AsseticBundle/Twig/StaticExtension.php @@ -15,7 +15,7 @@ use Assetic\Factory\AssetFactory; /** - * The Static extension is used when use_controllers is disabled. + * The static extension is used when use_controllers is disabled. * * @author Kris Wallsmith */ diff --git a/src/Symfony/Bundle/AsseticBundle/Twig/StaticNode.php b/src/Symfony/Bundle/AsseticBundle/Twig/StaticNode.php index 16c056bb017f..8f9f35086ea2 100644 --- a/src/Symfony/Bundle/AsseticBundle/Twig/StaticNode.php +++ b/src/Symfony/Bundle/AsseticBundle/Twig/StaticNode.php @@ -28,7 +28,7 @@ protected function getAssetUrlNode(\Twig_NodeInterface $body) return new \Twig_Node_Expression_Function( new \Twig_Node_Expression_Name('asset', $body->getLine()), new \Twig_Node(array( - new \Twig_Node_Expression_Constant($this->getAttribute('target_url'), $body->getLine()), + new \Twig_Node_Expression_Constant($this->getAttribute('output'), $body->getLine()), )), $body->getLine() ); diff --git a/src/Symfony/Bundle/AsseticBundle/Twig/StaticTokenParser.php b/src/Symfony/Bundle/AsseticBundle/Twig/StaticTokenParser.php index ecfff88bb992..5ee21b8ec72a 100644 --- a/src/Symfony/Bundle/AsseticBundle/Twig/StaticTokenParser.php +++ b/src/Symfony/Bundle/AsseticBundle/Twig/StaticTokenParser.php @@ -14,14 +14,14 @@ use Assetic\Extension\Twig\AsseticTokenParser; /** - * Parses the {% assets %} tag. + * Parses an Assetic tag. * * @author Kris Wallsmith */ class StaticTokenParser extends AsseticTokenParser { - static protected function createNode(\Twig_NodeInterface $body, array $sourceUrls, $targetUrl, array $filterNames, $assetName, $debug = false, $lineno = 0, $tag = null) + static protected function createNode(\Twig_NodeInterface $body, array $inputs, array $filters, array $attributes, $lineno = 0, $tag = null) { - return new StaticNode($body, $sourceUrls, $targetUrl, $filterNames, $assetName, $debug, $lineno, $tag); + return new StaticNode($body, $inputs, $filters, $attributes, $lineno, $tag); } }