Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
d674b8ea
Commit
d674b8ea
authored
Feb 21, 2008
by
guilhermeblanco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Doctrine_Pager_Range::isInRange, which checks if a given page is in the range
parent
499eaf6c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
Range.php
lib/Doctrine/Pager/Range.php
+14
-0
controlling-range-styles.txt
...docs/en/utilities/pagination/controlling-range-styles.txt
+3
-0
No files found.
lib/Doctrine/Pager/Range.php
View file @
d674b8ea
...
...
@@ -141,6 +141,20 @@ abstract class Doctrine_Pager_Range
}
/**
* isInRange
*
* Check if a given page is in the range
*
* @param $page Page to be checked
* @return boolean
*/
public
function
isInRange
(
$page
)
{
return
(
array_search
(
$page
,
$this
->
rangeAroundPage
())
!==
false
);
}
/**
* _initialize
*
...
...
manual/docs/en/utilities/pagination/controlling-range-styles.txt
View file @
d674b8ea
...
...
@@ -75,6 +75,9 @@ $pager_range->getOptions();
// Returns the custom Doctrine_Pager_Range implementation offset option
$pager_range->getOption($option);
// Check if a given page is in the range
$pager_range->isInRange($page);
// Return the range around the current page (obtained from Doctrine_Pager
// associated to the $pager_range instance)
$pager_range->rangeAroundPage();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment