Skip to content

Commit 08af3c9

Browse files
committed
Fixed code examples in book/propel
1 parent 29c0a1f commit 08af3c9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

book/propel.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,10 @@ is pretty easy. Add the following method to the ``DefaultController`` of the
140140
bundle::
141141

142142
// src/Acme/StoreBundle/Controller/DefaultController.php
143+
144+
// ...
143145
use Acme\StoreBundle\Model\Product;
144146
use Symfony\Component\HttpFoundation\Response;
145-
// ...
146147

147148
public function createAction()
148149
{
@@ -172,6 +173,7 @@ Fetching an object back from the database is even easier. For example, suppose
172173
you've configured a route to display a specific ``Product`` based on its ``id``
173174
value::
174175
176+
// ...
175177
use Acme\StoreBundle\Model\ProductQuery;
176178
177179
public function showAction($id)
@@ -183,7 +185,7 @@ value::
183185
throw $this->createNotFoundException('No product found for id '.$id);
184186
}
185187
186-
// do something, like pass the $product object into a template
188+
// ... do something, like pass the $product object into a template
187189
}
188190

189191
Updating an Object
@@ -192,6 +194,7 @@ Updating an Object
192194
Once you've fetched an object from Propel, updating it is easy. Suppose you
193195
have a route that maps a product id to an update action in a controller::
194196
197+
// ...
195198
use Acme\StoreBundle\Model\ProductQuery;
196199
197200
public function updateAction($id)
@@ -252,7 +255,6 @@ If you want to reuse some queries, you can add your own methods to the
252255
``ProductQuery`` class::
253256

254257
// src/Acme/StoreBundle/Model/ProductQuery.php
255-
256258
class ProductQuery extends BaseProductQuery
257259
{
258260
public function filterByExpensivePrice()
@@ -326,7 +328,6 @@ Now, let's see the code in action. Imagine you're inside a controller::
326328
use Acme\StoreBundle\Model\Category;
327329
use Acme\StoreBundle\Model\Product;
328330
use Symfony\Component\HttpFoundation\Response;
329-
// ...
330331
331332
class DefaultController extends Controller
332333
{

0 commit comments

Comments
 (0)