Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
f013f081
Commit
f013f081
authored
May 29, 2013
by
alexpott
Browse files
Issue
#2002948
by toddtomlinson, jeroen12345: Rename Views method use_pager() to usePager().
parent
6d411619
Changes
7
Hide whitespace changes
Inline
Side-by-side
core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
View file @
f013f081
...
...
@@ -283,7 +283,7 @@ public function isPagerEnabled() {
if
(
$this
->
usesPager
())
{
$pager
=
$this
->
getPlugin
(
'pager'
);
if
(
$pager
)
{
return
$pager
->
use
_p
ager
();
return
$pager
->
use
P
ager
();
}
}
return
FALSE
;
...
...
core/modules/views/lib/Drupal/views/Plugin/views/field/Counter.php
View file @
f013f081
...
...
@@ -49,7 +49,7 @@ public function get_value($values, $field = NULL) {
$count
=
is_numeric
(
$this
->
options
[
'counter_start'
])
?
$this
->
options
[
'counter_start'
]
-
1
:
0
;
$pager
=
$this
->
view
->
pager
;
// Get the base count of the pager.
if
(
$pager
->
use
_p
ager
())
{
if
(
$pager
->
use
P
ager
())
{
$count
+=
(
$pager
->
get_items_per_page
()
*
$pager
->
get_current_page
()
+
$pager
->
set_offset
());
}
// Add the counter for the current site.
...
...
core/modules/views/lib/Drupal/views/Plugin/views/pager/None.php
View file @
f013f081
...
...
@@ -63,7 +63,7 @@ public function buildOptionsForm(&$form, &$form_state) {
);
}
function
use
_p
ager
()
{
public
function
use
P
ager
()
{
return
FALSE
;
}
...
...
core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php
View file @
f013f081
...
...
@@ -160,7 +160,7 @@ public function summaryTitle() {
*
* Only a couple of very specific pagers will set this to false.
*/
function
use
_p
ager
()
{
public
function
use
P
ager
()
{
return
TRUE
;
}
...
...
core/modules/views/lib/Drupal/views/Plugin/views/pager/Some.php
View file @
f013f081
...
...
@@ -60,7 +60,7 @@ public function buildOptionsForm(&$form, &$form_state) {
);
}
function
use
_p
ager
()
{
public
function
use
P
ager
()
{
return
FALSE
;
}
...
...
core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php
View file @
f013f081
...
...
@@ -140,7 +140,7 @@ public function testNoLimit() {
$this
->
assertEqual
(
count
(
$view
->
result
),
8
,
'Make sure that every item beside the first three is returned in the result'
);
// Check some public functions.
$this
->
assertFalse
(
$view
->
pager
->
use
_p
ager
());
$this
->
assertFalse
(
$view
->
pager
->
use
P
ager
());
$this
->
assertFalse
(
$view
->
pager
->
use_count_query
());
$this
->
assertEqual
(
$view
->
pager
->
get_items_per_page
(),
0
);
}
...
...
@@ -186,7 +186,7 @@ public function testLimit() {
$this
->
assertEqual
(
count
(
$view
->
result
),
3
,
'Make sure that only a certain count of items is returned'
);
// Check some public functions.
$this
->
assertFalse
(
$view
->
pager
->
use
_p
ager
());
$this
->
assertFalse
(
$view
->
pager
->
use
P
ager
());
$this
->
assertFalse
(
$view
->
pager
->
use_count_query
());
}
...
...
core/modules/views/lib/Drupal/views/ViewExecutable.php
View file @
f013f081
...
...
@@ -525,7 +525,7 @@ public function setOffset($offset) {
*/
public
function
usePager
()
{
if
(
!
empty
(
$this
->
pager
))
{
return
$this
->
pager
->
use
_p
ager
();
return
$this
->
pager
->
use
P
ager
();
}
}
...
...
@@ -726,7 +726,7 @@ public function initPager() {
if
(
!
isset
(
$this
->
pager
))
{
$this
->
pager
=
$this
->
display_handler
->
getPlugin
(
'pager'
);
if
(
$this
->
pager
->
use
_p
ager
())
{
if
(
$this
->
pager
->
use
P
ager
())
{
$this
->
pager
->
set_current_page
(
$this
->
current_page
);
}
...
...
@@ -746,7 +746,7 @@ public function initPager() {
* Render the pager, if necessary.
*/
public
function
renderPager
(
$exposed_input
)
{
if
(
!
empty
(
$this
->
pager
)
&&
$this
->
pager
->
use
_p
ager
())
{
if
(
!
empty
(
$this
->
pager
)
&&
$this
->
pager
->
use
P
ager
())
{
return
$this
->
pager
->
render
(
$exposed_input
);
}
...
...
@@ -1176,7 +1176,7 @@ public function execute($display_id = NULL) {
$cache
=
$this
->
display_handler
->
getPlugin
(
'cache'
);
}
if
(
$cache
->
cache_get
(
'results'
))
{
if
(
$this
->
pager
->
use
_p
ager
())
{
if
(
$this
->
pager
->
use
P
ager
())
{
$this
->
pager
->
total_items
=
$this
->
total_rows
;
$this
->
pager
->
update_page_info
();
}
...
...
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