Skip to content

Commit

Permalink
Merge branch '2.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed May 15, 2014
2 parents 797cbd5 + fc2698b commit 704d206
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 8 deletions.
8 changes: 4 additions & 4 deletions components/class_loader/cache_class_loader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ ApcClassLoader
// instance of a class that implements a findFile() method, like the ClassLoader
$loader = ...;
// my_prefix is the APC namespace prefix to use
$cachedLoader = new ApcClassLoader('my_prefix', $loader);
// sha1(__FILE__) generates an APC namespace prefix
$cachedLoader = new ApcClassLoader(sha1(__FILE__), $loader);
// register the cached class loader
$cachedLoader->register();
Expand All @@ -54,8 +54,8 @@ it is straightforward::
// instance of a class that implements a findFile() method, like the ClassLoader
$loader = ...;
// my_prefix is the XCache namespace
$cachedLoader = new XcacheClassLoader('my_prefix', $loader);
// sha1(__FILE__) generates an XCache namespace prefix
$cachedLoader = new XcacheClassLoader(sha1(__FILE__), $loader);
// register the cached class loader
$cachedLoader->register();
Expand Down
4 changes: 2 additions & 2 deletions components/form/type_guesser.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ The ``TypeGuess`` constructor requires 3 options:
want to set the ``class`` option). If no types are guessed, this should be
set to an empty array;
* The confidence that the guessed type is correct. This can be one of the
constants of the :class:`Symfony\\Component\\Form\\Guess\Guess` class:
constants of the :class:`Symfony\\Component\\Form\\Guess\\Guess` class:
``LOW_CONFIDENCE``, ``MEDIUM_CONFIDENCE``, ``HIGH_CONFIDENCE``,
``VERY_HIGH_CONFIDENCE``. After all type guessers have been executed, the
type with the highest confidence is used.
Expand All @@ -105,7 +105,7 @@ With this knowledge, you can easily implement the ``guessType`` method of the
// otherwise, base the type on the @var annotation
switch ($annotations['var']) {
case 'string':
// there is a high confidence that the type is a string when
// there is a high confidence that the type is text when
// @var string is used
return new TypeGuess('text', array(), Guess::HIGH_CONFIDENCE);

Expand Down
17 changes: 17 additions & 0 deletions cookbook/form/form_customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,23 @@ field whose *id* is ``product_name`` (and name is ``product[name]``).
``ProductType`` equates to ``product``). If you're not sure what your
form name is, just view the source of your generated form.

If you want to change the ``product`` or ``name`` portion of the block
name ``_product_name_widget`` you can set the ``block_name`` option in your
form type::

use Symfony\Component\Form\FormBuilderInterface;

public function buildForm(FormBuilderInterface $builder, array $options)
{
// ...

$builder->add('name', 'text', array(
'block_name' => 'custom_name',
));
}

Then the block name will be ``_product_custom_name_widget``.

You can also override the markup for an entire field row using the same method:

.. configuration-block::
Expand Down
3 changes: 2 additions & 1 deletion cookbook/routing/custom_route_loader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ off the names of the action methods in a controller.

There are many bundles out there that use their own route loaders to
accomplish cases like those described above, for instance
`FOSRestBundle`_, `KnpRadBundle`_ and `SonataAdminBundle`_.
`FOSRestBundle`_, `JMSI18nRoutingBundle`_, `KnpRadBundle`_ and `SonataAdminBundle`_.

Loading Routes
--------------
Expand Down Expand Up @@ -262,5 +262,6 @@ configuration file - you can call the
loader (YAML, XML, PHP, annotation, etc.).

.. _`FOSRestBundle`: https://github.com/FriendsOfSymfony/FOSRestBundle
.. _`JMSI18nRoutingBundle`: https://github.com/schmittjoh/JMSI18nRoutingBundle
.. _`KnpRadBundle`: https://github.com/KnpLabs/KnpRadBundle
.. _`SonataAdminBundle`: https://github.com/sonata-project/SonataAdminBundle
3 changes: 2 additions & 1 deletion cookbook/routing/scheme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,5 @@ to always use ``http``.
The Security component provides another way to enforce HTTP or HTTPS via
the ``requires_channel`` setting. This alternative method is better suited
to secure an "area" of your website (all URLs under ``/admin``) or when
you want to secure URLs defined in a third party bundle.
you want to secure URLs defined in a third party bundle (see
:doc:`/cookbook/security/force_https` for more details).

0 comments on commit 704d206

Please sign in to comment.