Small cosmetics in pagination chapter (0.10 and trunk)
This commit is contained in:
parent
1ab785ac44
commit
d6ec5d6df2
@ -89,6 +89,10 @@ $pager_layout->setSelectedTemplate('[{%page}]');
|
||||
|
||||
// Fetching users
|
||||
$users = $pager_layout->execute();
|
||||
|
||||
foreach ($users as $user) {
|
||||
// ...
|
||||
}
|
||||
</code>
|
||||
|
||||
The method {{display()}} is the place where we define the custom mask we created. This method accepts 2 optional arguments: one array of optional masks and if the output should be returned instead of printed on screen.
|
||||
|
@ -28,7 +28,11 @@ If you try to access any of the methods provided by Doctrine_Pager now, you'll e
|
||||
To run the query, the process is similar to the current existent {{Doctrine_Query}} execute call. It even allow arguments the way you usually do it. Here is the PHP complete syntax, including the syntax of optional parameters:
|
||||
|
||||
<code type="php">
|
||||
$pager->execute([$args = array() [, $fetchType = Doctrine::FETCH_RECORD]]);
|
||||
$items = $pager->execute([$args = array() [, $fetchType = Doctrine::FETCH_RECORD]]);
|
||||
|
||||
foreach ($items as $item) {
|
||||
// ...
|
||||
}
|
||||
</code>
|
||||
|
||||
There are some special cases where the return records query differ of the counter query. To allow this situation, {{Doctrine_Pager}} has some methods that enable you to count and then to execute. The first thing you have to do is to define the count query:
|
||||
|
Loading…
Reference in New Issue
Block a user