Skip to content

Commit

Permalink
Fixed issues and typos in new formats
Browse files Browse the repository at this point in the history
Fixed issues by @stof
Fixed typo
  • Loading branch information
wouterj committed Mar 4, 2013
1 parent b1777b7 commit 4e6a87d
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 26 deletions.
2 changes: 1 addition & 1 deletion cookbook/configuration/override_dir_structure.rst
Expand Up @@ -117,7 +117,7 @@ may need to modify the paths inside these files::
<!-- app/config/config.xml -->
<!-- ... -->
<assetic:config read_from="%kernel.root_dir%/../../public_html" />
<assetic:config read-from="%kernel.root_dir%/../../public_html" />
.. code-block:: php
Expand Down
2 changes: 1 addition & 1 deletion cookbook/form/create_custom_field_type.rst
Expand Up @@ -131,7 +131,7 @@ you want to always render it in a ``ul`` element. In your form theme template

<!-- src/Acme/DemoBundle/Resources/views/Form/gender_widget.html.twig -->
<?php if ($expanded) : ?>
<ul <?php $view['slots']->output('widget_container_attributes') ?>>
<ul <?php $view['form']->block($form, 'widget_container_attributes') ?>>
<?php foreach ($form as $child) : ?>
<li>
<?php echo $view['form']->widget($child) ?>
Expand Down
2 changes: 1 addition & 1 deletion cookbook/form/data_transformers.rst
Expand Up @@ -293,7 +293,7 @@ it's recognized as a custom field type:
$container
->setDefinition('acme_demo.type.issue_selector', array(
'@doctrine.orm.entity_manager'
new Reference('doctrine.orm.entity_manager'),
))
->addTag('form.type', array(
'alias' => 'issue_selector',
Expand Down
2 changes: 1 addition & 1 deletion cookbook/form/form_collections.rst
Expand Up @@ -471,7 +471,7 @@ into new ``Tag`` objects and added to the ``tags`` property of the ``Task`` obje
<!-- ... -->
<one-to-many field="tags" target-entity="Tag">
<cascade>
<cascade-persists />
<cascade-persist />
</cascade>
</one-to-many>
</entity>
Expand Down
7 changes: 3 additions & 4 deletions cookbook/security/custom_authentication_provider.rst
Expand Up @@ -499,10 +499,9 @@ You are finished! You can now define parts of your app as under WSSE protection.
.. code-block:: xml
<config>
<firewall name="wsse_secured"
pattern="/api/.*"
wsse="true"
/>
<firewall name="wsse_secured" pattern="/api/.*">
<wsse />
</firewall>
</config>
.. code-block:: php
Expand Down
7 changes: 3 additions & 4 deletions cookbook/security/entity_provider.rst
Expand Up @@ -268,10 +268,9 @@ then be checked against your User entity records in the database:
<entity class="AcmeUserBundle:User" property="username" />
</provider>
<firewall name="admin_area"
pattern="^/admin"
http_basic
/>
<firewall name="admin_area" pattern="^/admin">
<http-basic />
</firewall>
<rule path="^/admin" role="ROLE_ADMIN" />
</config>
Expand Down
12 changes: 3 additions & 9 deletions cookbook/templating/global_variables.rst
Expand Up @@ -29,23 +29,17 @@ This is possible inside your ``app/config/config.yml`` file:
// app/config/config.php
$container->loadFromExtension('twig', array(
...,
// ...
'globals' => array(
'ga_tracking' => 'UA-xxxxx-x',
),
));
Now, the variable ``ga_tracking`` is available in all Twig templates:

.. configuration-block::

.. code-block:: html+jinja

<p>The google tracking code is: {{ ga_tracking }}</p>

.. code-block:: html+php
.. code-block:: html+jinja

<p>The google tracking code is: <?php echo $ga_tracking; ?></p>
<p>The google tracking code is: {{ ga_tracking }}</p>

It's that easy! You can also take advantage of the built-in :ref:`book-service-container-parameters`
system, which lets you isolate or reuse the value:
Expand Down
10 changes: 5 additions & 5 deletions cookbook/testing/http_authentication.rst
Expand Up @@ -39,9 +39,9 @@ key in your firewall, along with the ``form_login`` key:
<!-- app/config/config_test.xml -->
<security:config>
<firewall name="your_firewall_name">
<http-basic />
</firewall>
<security:firewall name="your_firewall_name">
<security:http-basic />
</security:firewall>
</security:config>
.. code-block:: php
Expand All @@ -50,7 +50,7 @@ key in your firewall, along with the ``form_login`` key:
$container->loadFromExtension('security', array(
'firewalls' => array(
'your_firewall_name' => array(
'http-basic' => array(),
'http_basic' => array(),
),
),
));
));

0 comments on commit 4e6a87d

Please sign in to comment.