Skip to content

Commit b04f311

Browse files
committed
Fix typos
| Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.3 | Fixed tickets |
1 parent a21042c commit b04f311

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

components/form/introduction.rst

+13-11
Original file line numberDiff line numberDiff line change
@@ -186,17 +186,17 @@ to bootstrap or access Twig and add the :class:`Symfony\\Bridge\\Twig\\Extension
186186
// this file comes with TwigBridge
187187
$defaultFormTheme = 'form_div_layout.html.twig';
188188

189-
$vendorDir = realpath(__DIR__ . '/../vendor');
189+
$vendorDir = realpath(__DIR__.'/../vendor');
190190
// the path to TwigBridge so Twig can locate the
191191
// form_div_layout.html.twig file
192192
$vendorTwigBridgeDir =
193-
$vendorDir . '/symfony/twig-bridge/Symfony/Bridge/Twig';
193+
$vendorDir.'/symfony/twig-bridge/Symfony/Bridge/Twig';
194194
// the path to your other templates
195-
$viewsDir = realpath(__DIR__ . '/../views');
195+
$viewsDir = realpath(__DIR__.'/../views');
196196

197197
$twig = new Twig_Environment(new Twig_Loader_Filesystem(array(
198198
$viewsDir,
199-
$vendorTwigBridgeDir . '/Resources/views/Form',
199+
$vendorTwigBridgeDir.'/Resources/views/Form',
200200
)));
201201
$formEngine = new TwigRendererEngine(array($defaultFormTheme));
202202
$formEngine->setEnvironment($twig);
@@ -315,24 +315,24 @@ Your integration with the Validation component will look something like this::
315315
use Symfony\Component\Form\Extension\Validator\ValidatorExtension;
316316
use Symfony\Component\Validator\Validation;
317317

318-
$vendorDir = realpath(__DIR__ . '/../vendor');
319-
$vendorFormDir = $vendorDir . '/symfony/form/Symfony/Component/Form';
318+
$vendorDir = realpath(__DIR__.'/../vendor');
319+
$vendorFormDir = $vendorDir.'/symfony/form/Symfony/Component/Form';
320320
$vendorValidatorDir =
321-
$vendorDir . '/symfony/validator/Symfony/Component/Validator';
321+
$vendorDir.'/symfony/validator/Symfony/Component/Validator';
322322

323323
// create the validator - details will vary
324324
$validator = Validation::createValidator();
325325

326326
// there are built-in translations for the core error messages
327327
$translator->addResource(
328328
'xlf',
329-
$vendorFormDir . '/Resources/translations/validators.en.xlf',
329+
$vendorFormDir.'/Resources/translations/validators.en.xlf',
330330
'en',
331331
'validators'
332332
);
333333
$translator->addResource(
334334
'xlf',
335-
$vendorValidatorDir . '/Resources/translations/validators.en.xlf',
335+
$vendorValidatorDir.'/Resources/translations/validators.en.xlf',
336336
'en',
337337
'validators'
338338
);
@@ -671,10 +671,12 @@ object::
671671

672672
// ...
673673

674-
// an array of FormError objects, but only errors attached to this form level (e.g. "global errors)
674+
// an array of FormError objects, but only errors attached to this
675+
// form level (e.g. "global errors)
675676
$errors = $form->getErrors();
676677

677-
// an array of FormError objects, but only errors attached to the "firstName" field
678+
// an array of FormError objects, but only errors attached to the
679+
// "firstName" field
678680
$errors = $form['firstName']->getErrors();
679681

680682
// a string representation of all errors of the whole form tree

0 commit comments

Comments
 (0)