Skip to content

[Cookbook][Configuration] add configuration cookbook handlig parameters in Configurator class #3420

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
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
address comments by xabbuh
  • Loading branch information
cordoval committed Jan 10, 2014
commit ad27a83d5a01bc379c38945fe9b1ccaaa875e999
2 changes: 1 addition & 1 deletion cookbook/bundles/extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ The second method has several specific advantages:
.. seealso::

For other usages of the parameter ``%`` syntax see
:doc:`Using Parameters Within A Dependency Injection Class </cookbook/using_parameters_in_dic>`.
:doc:`</cookbook/configuration/using_parameters_in_dic>`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is no longer true, is it?


.. index::
single: Bundle; Extension
Expand Down
2 changes: 1 addition & 1 deletion cookbook/configuration/front_controllers_and_kernel.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. index::
single: How front controller, ``AppKernel`` and environments
single: How the front controller, ``AppKernel`` and environments
work together

Understanding how the Front Controller, Kernel and Environments work together
Expand Down
24 changes: 12 additions & 12 deletions cookbook/configuration/using_parameters_in_dic.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.. index::
single: Using Parameters Within A Dependency Injection Class
single: Using Parameters within a Dependency Injection Class

Using Parameters Within A Dependency Injection Class
Using Parameters within a Dependency Injection Class
----------------------------------------------------

You have seen how to use configuration parameters within
:ref:`Symfony service container <book-service-container-parameters>`.
:ref:`Symfony service containers <book-service-container-parameters>`.
There are special cases such as when you want, for instance, to use the
``%kernel.debug%`` parameter to make the services in your bundle enter
debug mode. For this case there is more work to do in order
Expand Down Expand Up @@ -146,14 +146,14 @@ And set it in the constructor of ``Configuration`` via the ``Extension`` class::

.. sidebar:: Setting the Default in the Extension
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to indent the following lines by four spaces to make them part of the sidebar.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


There are some instances of ``%kernel.debug%`` usage within a ``Configurator``
class in TwigBundle and AsseticBundle, however this is because the default
parameter value is set by the Extension class. For example in AsseticBundle,
you can find::
There are some instances of ``%kernel.debug%`` usage within a ``Configurator``
class in TwigBundle and AsseticBundle, however this is because the default
parameter value is set by the Extension class. For example in AsseticBundle,
you can find::

$container->setParameter('assetic.debug', $config['debug']);
$container->setParameter('assetic.debug', $config['debug']);

The string ``%kernel.debug%`` passed here as an argument handles the
interpreting job to the container which in turn does the evaluation.
Both ways accomplish similar goals. AsseticBundle will not use
anymore ``%kernel.debug%`` but rather the new ``%assetic.debug%`` parameter.
The string ``%kernel.debug%`` passed here as an argument handles the
interpreting job to the container which in turn does the evaluation.
Both ways accomplish similar goals. AsseticBundle will not use
anymore ``%kernel.debug%`` but rather the new ``%assetic.debug%`` parameter.
2 changes: 1 addition & 1 deletion cookbook/routing/service_container_parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ path):
.. seealso::

For other usages of the parameter ``%`` syntax see
:doc:`Using Parameters Within A Dependency Injection Class </cookbook/using_parameters_in_dic>`.
:doc:`</cookbook/configuration/using_parameters_in_dic>`.