Skip to content

Updated the event dispatcher articles for Symfony 4 #8670

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 17, 2017
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions event_dispatcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,6 @@ Learn more

.. toctree::
:maxdepth: 1
:glob:

event_dispatcher/*
event_dispatcher/before_after_filters
event_dispatcher/method_behavior
11 changes: 5 additions & 6 deletions event_dispatcher/before_after_filters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,21 @@ token.
Before Filters with the ``kernel.controller`` Event
---------------------------------------------------

First, store some basic token configuration using ``config.yml`` and the
parameters key:
First, define some token configuration as parameters:

.. configuration-block::

.. code-block:: yaml

# app/config/config.yml
# config/services.yaml
parameters:
tokens:
client1: pass1
client2: pass2

.. code-block:: xml

<!-- app/config/config.xml -->
<!-- config/services.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -65,7 +64,7 @@ parameters key:

.. code-block:: php

// app/config/config.php
// config/services.php
$container->setParameter('tokens', array(
'client1' => 'pass1',
'client2' => 'pass2',
Expand Down Expand Up @@ -98,7 +97,7 @@ A controller that implements this interface simply looks like this::
class FooController extends Controller implements TokenAuthenticatedController
{
// An action that needs authentication
public function barAction()
public function bar()
{
// ...
}
Expand Down