Skip to content

Commit f5d5fe4

Browse files
committed
Changed the value string of the events. (BC-Break)
1 parent 93c28aa commit f5d5fe4

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

Resources/doc/custom_logic.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,20 @@ And register it in your `services.xml`.
3333
<services>
3434
<service id="acme_hello.upload_listener" class="Acme\HelloBundle\EventListener">
3535
<argument type="service" id="doctrine" />
36-
<tag name="kernel.event_listener" event="oneup.uploader.post.persist" method="onUpload" />
36+
<tag name="kernel.event_listener" event="oneup_uploader.post_persist" method="onUpload" />
3737
</service>
3838
</services>
3939
```
4040

4141
You can now implement you custom logic in the `onUpload` method of your EventListener.
4242

4343
## Use custom input data
44-
FineUploader supports passing custom data through the request as the following examples states. For example you can pass the id of an entity you wish to paste the images to.
44+
Many of the supported frontends support passing custom data through the request. Here's an example for [FineUploader](frontend_fineuploader.md) sending an id of an Entity along the normal request.
4545

4646
```html
4747
<script type="text/javascript">
48-
var uploader = new qq.FineUploader({
48+
var uploader = new qq.FineUploader(
49+
{
4950
element: document.getElementById('fine-uploader'),
5051
request: {
5152
endpoint: "{{ oneup_uploader_endpoint('gallery') }}",
@@ -57,7 +58,7 @@ var uploader = new qq.FineUploader({
5758
</script>
5859
```
5960

60-
As you can see, we extended the `request` part of the Fine Uploader by adding a `params` section. These variables are accessible through the request object in the EventHander.
61+
As you can see, we extended the `request` part of the FineUploader by adding a `params` section. These variables are accessible through the request object in the EventHander.
6162

6263
```php
6364
public function onUpload(PostPersistEvent $event)

UploadEvents.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
final class UploadEvents
66
{
7-
const POST_PERSIST = 'oneup.uploader.post.persist';
8-
const POST_UPLOAD = 'oneup.uploader.post.upload';
7+
const POST_PERSIST = 'oneup_uploader.post_persist';
8+
const POST_UPLOAD = 'oneup_uploader.post_upload';
99
}

0 commit comments

Comments
 (0)