Skip to content

Commit

Permalink
feature #4264 [#4003] A few more form_themes config changes (weaverryan)
Browse files Browse the repository at this point in the history
This PR was merged into the master branch.

Discussion
----------

[#4003] A few more form_themes config changes

| Q             | A
| ------------- | ---
| Doc fix?      | #4003
| New docs?     | not, but finishing an earlier change
| Applies to    | >= 2.6
| Fixed tickets | -

Hi guys!

This follows #4003 - I think I found a few other spots that needed to be updated.

Thanks!

Commits
-------

695cb20 [#4003] A few more form_themes config changes
  • Loading branch information
weaverryan committed Oct 15, 2014
2 parents 5b65654 + 695cb20 commit 25a17fe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
15 changes: 5 additions & 10 deletions book/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1580,9 +1580,8 @@ file:
# app/config/config.yml
twig:
form:
resources:
- 'AcmeTaskBundle:Form:fields.html.twig'
form_themes:
- 'AcmeTaskBundle:Form:fields.html.twig'
# ...
.. code-block:: xml
Expand All @@ -1596,9 +1595,7 @@ file:
http://symfony.com/schema/dic/twig http://symfony.com/schema/dic/twig/twig-1.0.xsd">
<twig:config>
<twig:form>
<twig:resource>AcmeTaskBundle:Form:fields.html.twig</twig:resource>
</twig:form>
<twig:theme>AcmeTaskBundle:Form:fields.html.twig</twig:theme>
<!-- ... -->
</twig:config>
</container>
Expand All @@ -1607,10 +1604,8 @@ file:
// app/config/config.php
$container->loadFromExtension('twig', array(
'form' => array(
'resources' => array(
'AcmeTaskBundle:Form:fields.html.twig',
),
'form_themes' => array(
'AcmeTaskBundle:Form:fields.html.twig',
),
// ...
));
Expand Down
15 changes: 5 additions & 10 deletions cookbook/form/create_custom_field_type.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,27 +159,22 @@ link for details), create a ``gender_widget`` block to handle this:
# app/config/config.yml
twig:
form:
resources:
- 'AcmeDemoBundle:Form:fields.html.twig'
form_themes:
- 'AcmeDemoBundle:Form:fields.html.twig'
.. code-block:: xml
<!-- app/config/config.xml -->
<twig:config>
<twig:form>
<twig:resource>AcmeDemoBundle:Form:fields.html.twig</twig:resource>
</twig:form>
<twig:form-theme>AcmeDemoBundle:Form:fields.html.twig</twig:form-theme>
</twig:config>
.. code-block:: php
// app/config/config.php
$container->loadFromExtension('twig', array(
'form' => array(
'resources' => array(
'AcmeDemoBundle:Form:fields.html.twig',
),
'form_themes' => array(
'AcmeDemoBundle:Form:fields.html.twig',
),
));
Expand Down

0 comments on commit 25a17fe

Please sign in to comment.