Skip to content

Commit 675eedb

Browse files
committed
Merge pull request #65 from pjam/issue64
fix #64
2 parents f26b95e + cfacd00 commit 675eedb

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

EventListener/CollectionUploadListener.php renamed to EventListener/UploadCollectionListener.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
1010
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
1111

12-
class CollectionUploadListener implements EventSubscriberInterface
12+
class UploadCollectionListener implements EventSubscriberInterface
1313
{
1414
/**
1515
* (non-PHPdoc)

Form/EventListener/UploadCollectionSubscriber.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class UploadCollectionSubscriber implements EventSubscriberInterface
8787
public function __construct($propertyName, array $options, FileStorageInterface $storage = null)
8888
{
8989
$this->propertyName = $propertyName;
90-
$this->dataClass = $options['options']['data_class'];
90+
$this->dataClass = $options['entry_options']['data_class'];
9191
$this->primaryKey = $options['primary_key'];
9292
$this->nameable = $options['nameable'];
9393
$this->nameableField = $options['nameable_field'];

Resources/doc/collection-upload/overview.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ images:
191191
label: Images
192192
dbType: collection
193193
formType: s2a_collection_upload
194+
# if using symfony > 2.8
195+
# formType: Admingenerator\FormExtensionsBundle\Form\Type\UploadCollectionType
194196
addFormOptions:
195197
primary_key: id
196198
nameable: true
@@ -200,10 +202,10 @@ images:
200202
editable: [ description ]
201203
#
202204
### you can create your own form type
203-
# type: \Acme\DemoBundle\Form\MyFormType
205+
# entry_type: \Acme\DemoBundle\Form\MyFormType
204206
#
205207
### or use admin:generate-admin command and use the admingenerated form type
206-
# type: \Acme\DemoBundle\Form\Type\Image\EditType
208+
# entry_type: \Acme\DemoBundle\Form\Type\Image\EditType
207209
#
208210
maxNumberOfFiles: 5
209211
maxFileSize: 500000
@@ -218,7 +220,7 @@ images:
218220
allow_add: true
219221
allow_delete: true
220222
error_bubbling: false
221-
options:
223+
entry_options:
222224
data_class: Acme\DemoBundle\Entity\GalleryImage
223225
```
224226

0 commit comments

Comments
 (0)