Skip to content

Commit 1964d8e

Browse files
committed
Fixed code examples in cookbook/doctrine
1 parent 28d11a9 commit 1964d8e

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

cookbook/doctrine/custom_dql_functions.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ In Symfony, you can register your custom DQL functions as follows:
5959
// app/config/config.php
6060
$container->loadFromExtension('doctrine', array(
6161
'orm' => array(
62-
// ...
62+
...,
6363
'entity_managers' => array(
6464
'default' => array(
65-
// ...
65+
...,
6666
'dql' => array(
6767
'string_functions' => array(
6868
'test_string' => 'Acme\HelloBundle\DQL\StringFunction',
@@ -80,4 +80,4 @@ In Symfony, you can register your custom DQL functions as follows:
8080
),
8181
));
8282
83-
.. _`DQL User Defined Functions`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/cookbook/dql-user-defined-functions.html
83+
.. _`DQL User Defined Functions`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/cookbook/dql-user-defined-functions.html

cookbook/doctrine/file_uploads.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ look like this::
106106
$form = $this->createFormBuilder($document)
107107
->add('name')
108108
->add('file')
109-
->getForm()
110-
;
109+
->getForm();
111110

112111
// ...
113112
}
@@ -160,7 +159,7 @@ The following controller shows you how to handle the entire process::
160159
$em->persist($document);
161160
$em->flush();
162161

163-
$this->redirect($this->generateUrl('...'));
162+
$this->redirect($this->generateUrl(...));
164163
}
165164
}
166165

@@ -198,7 +197,7 @@ in a moment to handle the file upload::
198197
$em->persist($document);
199198
$em->flush();
200199

201-
$this->redirect('...');
200+
$this->redirect(...);
202201
}
203202

204203
The ``upload()`` method will take advantage of the :class:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile`
@@ -313,7 +312,7 @@ call to ``$document->upload()`` should be removed from the controller::
313312
$em->persist($document);
314313
$em->flush();
315314

316-
$this->redirect('...');
315+
$this->redirect(...);
317316
}
318317

319318
.. note::
@@ -406,4 +405,4 @@ property, instead of the actual filename::
406405
You'll notice in this case that you need to do a little bit more work in
407406
order to remove the file. Before it's removed, you must store the file path
408407
(since it depends on the id). Then, once the object has been fully removed
409-
from the database, you can safely delete the file (in ``PostRemove``).
408+
from the database, you can safely delete the file (in ``PostRemove``).

0 commit comments

Comments
 (0)