Permalink
Browse files

renamed twig filter from "apply_filter" to "imagine_filter"

  • Loading branch information...
1 parent 9a9d2ef commit b00818e619d2409bbf75e8e2a58dfaa0fed1c936 @lsmith77 lsmith77 committed Oct 19, 2011
Showing with 4 additions and 4 deletions.
  1. +2 −2 README.md
  2. +2 −2 Templating/ImagineExtension.php
View
@@ -11,7 +11,7 @@ https://github.com/avalanche123/AvalancheImagineBundle/pull/25
For example with this bundle the following is possible:
``` jinja
-<img src="{{ '/relative/path/to/image.jpg' | apply_filter('thumbnail') }}" />
+<img src="{{ '/relative/path/to/image.jpg' | imagine_filter('thumbnail') }}" />
````
This will perform the transformation called `thumbnail`, which you can define
@@ -117,7 +117,7 @@ We'll learn more about available transformations later, but for now, this
new filter can be used immediately in a template:
``` jinja
-<img src="{{ '/relative/path/to/image.jpg' | apply_filter('my_thumb') }}" />
+<img src="{{ '/relative/path/to/image.jpg' | imagine_filter('my_thumb') }}" />
```
Or if you're using PHP templates:
@@ -29,7 +29,7 @@ public function __construct(CachePathResolver $cachePathResolver)
public function getFilters()
{
return array(
- 'apply_filter' => new \Twig_Filter_Method($this, 'applyFilter'),
+ 'imagine_filter' => new \Twig_Filter_Method($this, 'filter'),
);
}
@@ -41,7 +41,7 @@ public function getFilters()
*
* @return string
*/
- public function applyFilter($path, $filter)
+ public function filter($path, $filter)
{
return $this->cachePathResolver->getBrowserPath($path, $filter);
}

0 comments on commit b00818e

Please sign in to comment.