Skip to content

Commit 2910574

Browse files
committedAug 13, 2014
Update imageasset for master Vich
As from dd408d in the master of Vich Uploader Bundle, the field name in asset is changed to mappingName. See dustin10/VichUploaderBundle@dd408d5.
1 parent b8c19e6 commit 2910574

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎Twig/Extension/ImageAssetsExtension.php

+3
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ public function asset($object, $field)
5959
$ext = new \Vich\UploaderBundle\Twig\Extension\UploaderExtension(
6060
$this->container->get('vich_uploader.templating.helper.uploader_helper')
6161
);
62+
63+
// Overwrite the fieldname with the needed mappingname by Vich
64+
$params[1] = $this->container->get('vich_uploader.property_mapping_factory')->fromField($object, $field)->getMappingName();
6265

6366
return call_user_func_array(array($ext, "asset"), $params);
6467
}

0 commit comments

Comments
 (0)