Skip to content

Minor fixes for upload_file.rst #8665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions controller/upload_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ to :doc:`customize form rendering </form/form_customization>`):
Finally, you need to update the code of the controller that handles the form::

// src/AppBundle/Controller/ProductController.php
namespace AppBundle\ProductController;
namespace AppBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
Expand Down Expand Up @@ -395,15 +395,16 @@ Now, register this class as a Doctrine listener:
http://symfony.com/schema/dic/services/services-1.0.xsd">
<!-- ... -->

<service id="app.doctrine_brochure_listener"
class="AppBundle\EventListener\BrochureUploaderListener"
>
<argument type="service" id="app.brochure_uploader"/>

<tag name="doctrine.event_listener" event="prePersist"/>
<tag name="doctrine.event_listener" event="preUpdate"/>
</service>
<services>
<service id="app.doctrine_brochure_listener"
class="AppBundle\EventListener\BrochureUploaderListener"
>
<argument type="service" id="app.brochure_uploader"/>

<tag name="doctrine.event_listener" event="prePersist"/>
<tag name="doctrine.event_listener" event="preUpdate"/>
</service>
</services>
</container>

.. code-block:: php
Expand Down