Commit d49835d1 authored by Fabien Potencier's avatar Fabien Potencier

fixed docs

parent d6a7a30b
...@@ -31,8 +31,6 @@ Registering ...@@ -31,8 +31,6 @@ Registering
will be used. But you will have to register the :doc:`translation provider will be used. But you will have to register the :doc:`translation provider
<translation>` as the default form layout requires it:: <translation>` as the default form layout requires it::
.. code-block:: php
$app->register(new Silex\Provider\TranslationServiceProvider(), array( $app->register(new Silex\Provider\TranslationServiceProvider(), array(
'translator.domains' => array(), 'translator.domains' => array(),
)); ));
...@@ -69,9 +67,10 @@ Usage ...@@ -69,9 +67,10 @@ Usage
The FormServiceProvider provides a ``form.factory`` service. Here is a usage The FormServiceProvider provides a ``form.factory`` service. Here is a usage
example:: example::
use Symfony\Component\Form\Extension\Core\Type\FormType; use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
$app->match('/form', function (Request $request) use ($app) { $app->match('/form', function (Request $request) use ($app) {
// some default data for when the form is displayed the first time // some default data for when the form is displayed the first time
$data = array( $data = array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment