Skip to content

Commit

Permalink
merge some files from master, to relase 1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
garak committed Jul 3, 2017
1 parent 56c0d3a commit e7a1118
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions Form/Type/VichImageType.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public function buildView(FormView $view, FormInterface $form, array $options)
$object = $form->getParent()->getData();
$view->vars['object'] = $object;
$view->vars['image_uri'] = null;
$view->vars['download_uri'] = null;

if ($object) {
if ($options['imagine_pattern']) {
Expand All @@ -77,10 +78,10 @@ public function buildView(FormView $view, FormInterface $form, array $options)
);

$view->vars['download_uri'] = $this->resolveUriOption($options['download_uri'], $object, $form);
// required for BC
//TODO: remove for 2.0
$view->vars['show_download_link'] = !empty($view->vars['download_uri']);
}
// required for BC
//TODO: remove for 2.0
$view->vars['show_download_link'] = !empty($view->vars['download_uri']);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions Resources/doc/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use Vich\UploaderBundle\Event\Event;

class FooListener
{
public function onPreUpload(Event $event)
public function onVichUploaderPreUpload(Event $event)
{
$object = $event->getObject();
$mapping = $event->getMapping();
Expand All @@ -51,4 +51,4 @@ services:
- { name: kernel.event_listener, event: vich_uploader.pre_upload }
```
[Return to the index](index.md)
[Return to the index](index.md)
2 changes: 1 addition & 1 deletion Resources/doc/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class Product
*/
public function setImageSize($imageSize)
{
$this->imagesize = $imageSize;
$this->imageSize = $imageSize;
return $this;
}
Expand Down

0 comments on commit e7a1118

Please sign in to comment.