Pārlūkot izejas kodu

[AsseticBundle] fixed twig classes for api changes in assetic

Kris Wallsmith 14 gadi atpakaļ
vecāks
revīzija
98b3a2d9eb

+ 1 - 1
src/Symfony/Bundle/AsseticBundle/Twig/DynamicNode.php

@@ -28,7 +28,7 @@ class DynamicNode extends AsseticNode
         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()
         );

+ 3 - 3
src/Symfony/Bundle/AsseticBundle/Twig/DynamicTokenParser.php

@@ -14,14 +14,14 @@ namespace Symfony\Bundle\AsseticBundle\Twig;
 use Assetic\Extension\Twig\AsseticTokenParser;
 
 /**
- * Parses the {% assets %} tag.
+ * Parses an Assetic tag.
  *
  * @author Kris Wallsmith <kris.wallsmith@symfony.com>
  */
 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);
     }
 }

+ 1 - 1
src/Symfony/Bundle/AsseticBundle/Twig/StaticExtension.php

@@ -15,7 +15,7 @@ use Assetic\Extension\Twig\AsseticExtension;
 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 <kris.wallsmith@symfony.com>
  */

+ 1 - 1
src/Symfony/Bundle/AsseticBundle/Twig/StaticNode.php

@@ -28,7 +28,7 @@ class StaticNode extends AsseticNode
         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()
         );

+ 3 - 3
src/Symfony/Bundle/AsseticBundle/Twig/StaticTokenParser.php

@@ -14,14 +14,14 @@ namespace Symfony\Bundle\AsseticBundle\Twig;
 use Assetic\Extension\Twig\AsseticTokenParser;
 
 /**
- * Parses the {% assets %} tag.
+ * Parses an Assetic tag.
  *
  * @author Kris Wallsmith <kris.wallsmith@symfony.com>
  */
 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);
     }
 }