1
0
mirror of synced 2024-12-14 23:26:04 +03:00

Small cosmetics in pagination chapter (0.10 and trunk)

This commit is contained in:
guilhermeblanco 2008-02-21 04:40:00 +00:00
parent 1ab785ac44
commit d6ec5d6df2
3 changed files with 45 additions and 37 deletions

View File

@ -89,6 +89,10 @@ $pager_layout->setSelectedTemplate('[{%page}]');
// Fetching users // Fetching users
$users = $pager_layout->execute(); $users = $pager_layout->execute();
foreach ($users as $user) {
// ...
}
</code> </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. 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.

View File

@ -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: 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"> <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> </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: 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: