Skip to content

Commit

Permalink
Removed a few remaining places using Acme where they should not
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed Jul 27, 2015
1 parent 1b20197 commit 6d6d636
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
28 changes: 14 additions & 14 deletions Resources/doc/overriding_forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ the form type hierarchy and then adds the custom ``name`` field.

.. code-block:: php
// src/AppBundle/Form/Type/RegistrationFormType.php
// src/AppBundle/Form/RegistrationType.php
namespace AppBundle\Form\Type;
namespace AppBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
class RegistrationFormType extends AbstractType
class RegistrationType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
Expand All @@ -89,7 +89,7 @@ the form type hierarchy and then adds the custom ``name`` field.
public function getName()
{
return 'acme_user_registration';
return 'app_user_registration';
}
}
Expand All @@ -113,14 +113,14 @@ Below is an example of configuring your form type as a service:
# app/config/services.yml
services:
acme_user.registration.form.type:
class: AppBundle\Form\Type\RegistrationFormType
app.form.registration:
class: AppBundle\Form\RegistrationType
tags:
- { name: form.type, alias: acme_user_registration }
- { name: form.type, alias: app_user_registration }
.. code-block:: xml
<!-- app/Resources/config/services.xml -->
<!-- app/config/services.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
Expand All @@ -129,8 +129,8 @@ Below is an example of configuring your form type as a service:
<services>
<service id="acme_user.registration.form.type" class="AppBundle\Form\Type\RegistrationFormType">
<tag name="form.type" alias="acme_user_registration" />
<service id="app.form.registration" class="AppBundle\Form\RegistrationType">
<tag name="form.type" alias="app_user_registration" />
</service>
</services>
Expand All @@ -148,7 +148,7 @@ changing the registration form type in YAML.
# ...
registration:
form:
type: acme_user_registration
type: app_user_registration
Note how the ``alias`` value used in your form type's service configuration tag
is used in the bundle configuration to tell the FOSUserBundle to use your custom
Expand Down Expand Up @@ -248,7 +248,7 @@ configuring your form handler as a service:
# app/config/services.yml
services:
acme_user.form.handler.registration:
app.form.handler.registration:
class: AppBundle\Form\Handler\RegistrationFormHandler
arguments: ["@fos_user.registration.form", "@request", "@fos_user.user_manager", "@fos_user.mailer", "@fos_user.util.token_generator"]
scope: request
Expand All @@ -265,7 +265,7 @@ configuring your form handler as a service:
<services>
<service id="acme_user.form.handler.registration" class="AppBundle\Form\Handler\RegistrationFormHandler" scope="request" public="false">
<service id="app.form.handler.registration" class="AppBundle\Form\Handler\RegistrationFormHandler" scope="request" public="false">
<argument type="service" id="fos_user.registration.form" />
<argument type="service" id="request" />
<argument type="service" id="fos_user.user_manager" />
Expand All @@ -291,7 +291,7 @@ left to do is update the FOSUserBundle configuration.
# ...
registration:
form:
handler: acme_user.form.handler.registration
handler: app.form.handler.registration
Note how the ``id`` of your configured service is used in the bundle configuration
to tell the FOSUserBundle to use your custom form handler.
Expand Down
16 changes: 8 additions & 8 deletions Resources/doc/overriding_templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,20 @@ to override the one provided by the bundle.

.. code-block:: html+jinja

{% extends 'AcmeDemoBundle::layout.html.twig' %}
{% extends 'layout.html.twig' %}

{% block title %}Acme Demo Application{% endblock %}
{% block title %}Demo Application{% endblock %}

{% block content %}
{% block fos_user_content %}{% endblock %}
{% endblock %}

This example extends the layout template from a fictional application bundle named
``AcmeDemoBundle``. The ``content`` block is where the main content of each page is rendered.
This is why the ``fos_user_content`` block has been placed inside of it. This will
lead to the desired effect of having the output from the FOSUserBundle actions
integrated into our applications layout, preserving the look and feel of the
application.
This example extends the layout template from the layout of your app. The
``content`` block is where the main content of each page is rendered. This
is why the ``fos_user_content`` block has been placed inside of it. This
will lead to the desired effect of having the output from the FOSUserBundle
actions integrated into our applications layout, preserving the look and
feel of the application.

**a) Define New Template In app/Resources**

Expand Down

0 comments on commit 6d6d636

Please sign in to comment.