Skip to content

Commit

Permalink
removed gridFS configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jdewit committed Aug 16, 2012
1 parent 86c166a commit 3cce6aa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
1 change: 0 additions & 1 deletion DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public function getConfigTreeBuilder()
->scalarNode('cache_base_path')->defaultValue('')->end()
->scalarNode('data_loader')->defaultValue('filesystem')->end()
->scalarNode('controller_action')->defaultValue('liip_imagine.controller:filterAction')->end()
->scalarNode('image_class')->defaultNull()->end()
->arrayNode('formats')
->defaultValue(array())
->prototype('scalar')->end()
Expand Down
2 changes: 0 additions & 2 deletions DependencyInjection/LiipImagineExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ public function load(array $configs, ContainerBuilder $container)

$container->setParameter('liip_imagine.controller_action', $config['controller_action']);

$container->setParameter('liip_imagine.image_class', $config['image_class']);

if ('2' == Kernel::MAJOR_VERSION && '0' == Kernel::MINOR_VERSION) {
$container->removeDefinition('liip_imagine.cache.clearer');
}
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,14 +447,23 @@ services:
Load your images from mongodb
``` yaml
liip_imagine:
image_class: Application\ImageBundle\Document\Image
filter_sets:
my_special_style:
data_loader: grid_fs
filters:
my_custom_filter: { }
```

Add loader to your services
``` xml
<service id="liip_imagine.data.loader.grid_fs" class="Liip\ImagineBundle\Imagine\Data\Loader\GridFSLoader">
<tag name="liip_imagine.data.loader" loader="grid_fs" />
<argument type="service" id="liip_imagine" />
<argument type="service" id="doctrine.odm.mongodb.document_manager" />
<argument>Application\ImageBundle\Document\Image</argument>
</service>
```

Reference the image by its id
``` jinja
<img src="{{ image.id | imagine_filter('my_thumb') }}" />
Expand Down
7 changes: 0 additions & 7 deletions Resources/config/imagine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,6 @@
<argument>%liip_imagine.data_root%</argument>
</service>

<service id="liip_imagine.data.loader.grid_fs" class="Liip\ImagineBundle\Imagine\Data\Loader\GridFSLoader">
<tag name="liip_imagine.data.loader" loader="grid_fs" />
<argument type="service" id="liip_imagine" />
<argument type="service" id="doctrine.odm.mongodb.document_manager" />
<argument>%liip_imagine.image_class%</argument>
</service>

<!-- Cache resolver -->

<service id="liip_imagine.cache.resolver.web_path" class="%liip_imagine.cache.resolver.web_path.class%">
Expand Down

0 comments on commit 3cce6aa

Please sign in to comment.