Skip to content
This repository has been archived by the owner on Mar 5, 2022. It is now read-only.

Commit

Permalink
Update The-Image-Helper.md
Browse files Browse the repository at this point in the history
  • Loading branch information
burzum committed Jun 8, 2015
1 parent 11182dc commit 6f0ff62
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/Documentation/The-Image-Helper.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ The Image Helper

The plugin comes with an Image helper that makes it easy to display the images generated by the ImageStorage model and the events that process the images.

This helper is the best added to your ```AppController```.

```php
class AppController extends Controller {
$helpers = array(
'FileStorage.Image'
);
namespace App\View;
class AppView extends View {
public function initialize() {
parent::initialize();
$this->loadHelper('Burzum/UserTools.Image');
}
}
````
```

In your views you can now access all your image versions, which you have declared before in your config, through the helper.
In your views you can now access all your image versions, which you have declared before in your config through the helper.

```php
echo $this->Image->display($product['Image'], 'small');
Expand All @@ -31,4 +31,4 @@ Options for display() and imageUrl()

The third argument of both methods is an option array, right now it has only one option to set.

* **fallback:** Optional, can be boolean true or string. If boolean true it will use ```placeholder/<YOUR-VERSION>.jpg``` as place holder. If string it will use that as image.
* **fallback:** Optional, can be boolean true or string. If boolean true it will use ```placeholder/<YOUR-VERSION>.jpg``` as place holder. If string it will use that as image.

0 comments on commit 6f0ff62

Please sign in to comment.