Skip to content

Commit

Permalink
minor #4537 Update link to remove absolute URL (jms85, dangarzon)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

Update link to remove absolute URL

Commits
-------

7282965 Change symfony-docs internal links avoiding absolute urls in introduction article
ffa17b2 Change symfony-docs internal links avoiding absolute urls in security article
c7f9cf5 Remove unused links
079bd64 Change symfony-docs internal links avoiding absolute urls
cf32b4c Remove absolutes url
ae877f2 Remove absolute url from override_dir_structure link
f7de50e Update link to remove absolute URL
  • Loading branch information
wouterj committed Dec 1, 2014
2 parents 05f5dba + 7282965 commit a109c4b
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 50 deletions.
3 changes: 1 addition & 2 deletions best_practices/controllers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ Pre and Post Hooks
------------------

If you need to execute some code before or after the execution of your controllers,
you can use the EventDispatcher component to `set up before/after filters`_.
you can use the EventDispatcher component to :doc:`/cookbook/event_dispatcher/before_after_filters`.

.. _`ParamConverter`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html
.. _`set up before/after filters`: http://symfony.com/doc/current/cookbook/event_dispatcher/before_after_filters.html
4 changes: 2 additions & 2 deletions best_practices/creating-the-project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ Extending the Directory Structure
---------------------------------

If your project or infrastructure requires some changes to the default directory
structure of Symfony, you can `override the location of the main directories`_:
structure of Symfony, you can
:doc:`override the location of the main directories </cookbook/configuration/override_dir_structure>`:
``cache/``, ``logs/`` and ``web/``.

In addition, Symfony3 will use a slightly different directory structure when
Expand All @@ -247,6 +248,5 @@ the Symfony2 directory structure.
.. _`Composer`: https://getcomposer.org/
.. _`Get Started`: https://getcomposer.org/doc/00-intro.md
.. _`Composer download page`: https://getcomposer.org/download/
.. _`override the location of the main directories`: http://symfony.com/doc/current/cookbook/configuration/override_dir_structure.html
.. _`public checksums repository`: https://github.com/sensiolabs/checksums
.. _`these steps`: http://fabien.potencier.org/article/73/signing-project-releases
15 changes: 6 additions & 9 deletions best_practices/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ To use the class, use ``createForm`` and instantiate the new class:
Registering Forms as Services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can also `register your form type as a service`_. But this is *not* recommended
unless you plan to reuse the new form type in many places or embed it in
other forms directly or via the `collection type`_.
You can also
:ref:`register your form type as a service <form-cookbook-form-field-service>`.
But this is *not* recommended unless you plan to reuse the new form type in many
places or embed it in other forms directly or via the
:doc:`collection type </reference/forms/types/collection>`.

For most forms that are used only to edit or create something, registering
the form as a service is over-kill, and makes it more difficult to figure
Expand Down Expand Up @@ -169,7 +171,7 @@ fields:

If you need more control over how your fields are rendered, then you should
remove the ``form_widget(form)`` function and render your fields individually.
See `How to Customize Form Rendering`_ for more information on this and how
See :doc:`/cookbook/form/form_customization` for more information on this and how
you can control *how* the form renders at a global level using form theming.

Handling Form Submits
Expand Down Expand Up @@ -210,8 +212,3 @@ Second, we recommend using ``$form->isSubmitted()`` in the ``if`` statement
for clarity. This isn't technically needed, since ``isValid()`` first calls
``isSubmitted()``. But without this, the flow doesn't read well as it *looks*
like the form is *always* processed (even on the GET request).

.. _`register your form type as a service`: http://symfony.com/doc/current/cookbook/form/create_custom_field_type.html#creating-your-field-type-as-a-service
.. _`collection type`: http://symfony.com/doc/current/reference/forms/types/collection.html
.. _`How to Customize Form Rendering`: http://symfony.com/doc/current/cookbook/form/form_customization.html
.. _`form event system`: http://symfony.com/doc/current/cookbook/form/dynamic_form_modification.html
6 changes: 1 addition & 5 deletions best_practices/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Who this Book Is for (Hint: It's not a Tutorial)
Any Symfony developer, whether you are an expert or a newcomer, can read this
guide. But since this isn't a tutorial, you'll need some basic knowledge of
Symfony to follow everything. If you are totally new to Symfony, welcome!
Start with `The Quick Tour`_ tutorial first.
Start with :doc:`The Quick Tour </quick_tour/the_big_picture>` tutorial first.

We've deliberately kept this guide short. We won't repeat explanations that
you can find in the vast Symfony documentation, like discussions about dependency
Expand Down Expand Up @@ -95,7 +95,3 @@ practices**. The reasons for not doing it are various:
your tests or adding features that provide real value to the end users.

.. _`Fabien Potencier`: https://connect.sensiolabs.com/profile/fabpot
.. _`The Quick Tour`: http://symfony.com/doc/current/quick_tour/the_big_picture.html
.. _`The Official Symfony Book`: http://symfony.com/doc/current/book/index.html
.. _`The Symfony Cookbook`: http://symfony.com/doc/current/cookbook/index.html
.. _`github.com/.../...`: http://github.com/.../...
31 changes: 12 additions & 19 deletions best_practices/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Authentication and Firewalls (i.e. Getting the User's Credentials)

You can configure Symfony to authenticate your users using any method you
want and to load user information from any source. This is a complex topic,
but the `Security Cookbook Section`_ has a lot of information about this.
but the :doc:`Security Cookbook Section </cookbook/security/index>` has a
lot of information about this.

Regardless of your needs, authentication is configured in ``security.yml``,
primarily under the ``firewalls`` key.
Expand Down Expand Up @@ -72,8 +73,9 @@ Authorization (i.e. Denying Access)
-----------------------------------

Symfony gives you several ways to enforce authorization, including the ``access_control``
configuration in `security.yml`_, the :ref:`@Security annotation <best-practices-security-annotation>`
and using :ref:`isGranted <best-practices-directy-isGranted>` on the ``security.context``
configuration in :doc:`security.yml </reference/configuration/security>` the
:ref:`@Security annotation <best-practices-security-annotation>` and using
:ref:`isGranted <best-practices-directy-isGranted>` on the ``security.context``
service directly.

.. best-practice::
Expand Down Expand Up @@ -240,8 +242,8 @@ Security Voters

If your security logic is complex and can't be centralized into a method
like ``isAuthor()``, you should leverage custom voters. These are an order
of magnitude easier than `ACL's`_ and will give you the flexibility you need
in almost all cases.
of magnitude easier than :doc:`ACL's </cookbook/security/acl>` and will give
you the flexibility you need in almost all cases.

First, create a voter class. The following example shows a voter that implements
the same ``getAuthorEmail`` logic you used above:
Expand Down Expand Up @@ -337,27 +339,18 @@ The `FOSUserBundle`_, developed by the Symfony community, adds support for a
database-backed user system in Symfony2. It also handles common tasks like
user registration and forgotten password functionality.

Enable the `Remember Me feature`_ to allow your users to stay logged in for
a long period of time.
Enable the :doc:`Remember Me feature </cookbook/security/remember_me>` to
allow your users to stay logged in for a long period of time.

When providing customer support, sometimes it's necessary to access the application
as some *other* user so that you can reproduce the problem. Symfony provides
the ability to `impersonate users`_.
the ability to :doc:`impersonate users </cookbook/security/impersonating_user>`.

If your company uses a user login method not supported by Symfony, you can
develop `your own user provider`_ and `your own authentication provider`_.
develop :doc:`your own user provider </cookbook/security/custom_provider>` and
:doc:`your own authentication provider </cookbook/security/custom_authentication_provider>`.

.. _`Security Cookbook Section`: http://symfony.com/doc/current/cookbook/security/index.html
.. _`security.yml`: http://symfony.com/doc/current/reference/configuration/security.html
.. _`ParamConverter`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html
.. _`@Security annotation`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/security.html
.. _`security.yml`: http://symfony.com/doc/current/reference/configuration/security.html
.. _`security voter`: http://symfony.com/doc/current/cookbook/security/voters_data_permission.html
.. _`Acces Control List`: http://symfony.com/doc/current/cookbook/security/acl.html
.. _`ACL's`: http://symfony.com/doc/current/cookbook/security/acl.html
.. _`expression`: http://symfony.com/doc/current/components/expression_language/introduction.html
.. _`FOSUserBundle`: https://github.com/FriendsOfSymfony/FOSUserBundle
.. _`Remember Me feature`: http://symfony.com/doc/current/cookbook/security/remember_me.html
.. _`impersonate users`: http://symfony.com/doc/current/cookbook/security/impersonating_user.html
.. _`your own user provider`: http://symfony.com/doc/current/cookbook/security/custom_provider.html
.. _`your own authentication provider`: http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html
4 changes: 0 additions & 4 deletions best_practices/templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,5 @@ name is irrelevant because you never use it in your own code):
tags:
- { name: twig.extension }
.. _`Twig`: http://twig.sensiolabs.org/
.. _`Parsedown`: http://parsedown.org/
.. _`Twig global variables`: http://symfony.com/doc/master/cookbook/templating/global_variables.html
.. _`override error pages`: http://symfony.com/doc/current/cookbook/controller/error_pages.html
.. _`render a template without using a controller`: http://symfony.com/doc/current/cookbook/templating/render_without_controller.html
18 changes: 9 additions & 9 deletions best_practices/web-assets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ tools like GruntJS.
Use Assetic to compile, combine and minimize web assets, unless you're
comfortable with frontend tools like GruntJS.

`Assetic`_ is an asset manager capable of compiling assets developed with
a lot of different frontend technologies like LESS, Sass and CoffeeScript.
:doc:`Assetic </cookbook/assetic/asset_management>` is an asset manager capable
of compiling assets developed with a lot of different frontend technologies
like LESS, Sass and CoffeeScript.
Combining all your assets with Assetic is a matter of wrapping all the assets
with a single Twig tag:

Expand Down Expand Up @@ -86,12 +87,11 @@ separating the repositories if you want).
Learn More about Assetic
------------------------

Assetic can also minimize CSS and JavaScript assets `using UglifyCSS/UglifyJS`_
to speed up your websites. You can even `compress images`_ with Assetic to
reduce their size before serving them to the user. Check out the
`official Assetic documentation`_ to learn more about all the available features.
Assetic can also minimize CSS and JavaScript assets
:doc:`using UglifyCSS/UglifyJS </cookbook/assetic/uglifyjs>` to speed up your
websites. You can even :doc:`compress images </cookbook/assetic/jpeg_optimize>`
with Assetic to reduce their size before serving them to the user. Check out
the `official Assetic documentation`_ to learn more about all the available
features.

.. _`Assetic`: http://symfony.com/doc/current/cookbook/assetic/asset_management.html
.. _`using UglifyCSS/UglifyJS`: http://symfony.com/doc/current/cookbook/assetic/uglifyjs.html
.. _`compress images`: http://symfony.com/doc/current/cookbook/assetic/jpeg_optimize.html
.. _`official Assetic documentation`: https://github.com/kriswallsmith/assetic

0 comments on commit a109c4b

Please sign in to comment.