diff --git a/components/class_loader/cache_class_loader.rst b/components/class_loader/cache_class_loader.rst index 1d122fd9fef..c9c1956d808 100644 --- a/components/class_loader/cache_class_loader.rst +++ b/components/class_loader/cache_class_loader.rst @@ -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(); @@ -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(); diff --git a/components/form/type_guesser.rst b/components/form/type_guesser.rst index 015bb8aeb1b..819e835ca8e 100644 --- a/components/form/type_guesser.rst +++ b/components/form/type_guesser.rst @@ -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. @@ -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); diff --git a/cookbook/form/form_customization.rst b/cookbook/form/form_customization.rst index 8b8e5c94fcb..fb36e4fc01f 100644 --- a/cookbook/form/form_customization.rst +++ b/cookbook/form/form_customization.rst @@ -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:: diff --git a/cookbook/routing/custom_route_loader.rst b/cookbook/routing/custom_route_loader.rst index 36694e36727..5c582db6230 100644 --- a/cookbook/routing/custom_route_loader.rst +++ b/cookbook/routing/custom_route_loader.rst @@ -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 -------------- @@ -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 diff --git a/cookbook/routing/scheme.rst b/cookbook/routing/scheme.rst index 723c18f9b09..a9727560398 100644 --- a/cookbook/routing/scheme.rst +++ b/cookbook/routing/scheme.rst @@ -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).