Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

renamed twig filter from "apply_filter" to "imagine_filter"

  • Loading branch information...
commit b00818e619d2409bbf75e8e2a58dfaa0fed1c936 1 parent 9a9d2ef
@lsmith77 lsmith77 authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 README.md
  2. +2 −2 Templating/ImagineExtension.php
View
4 README.md
@@ -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:
View
4 Templating/ImagineExtension.php
@@ -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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.