|
Server IP : 10.2.73.233 / Your IP : 216.73.216.223 Web Server : Apache/2.4.59 (Debian) System : Linux polon 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64 User : www-data ( 33) PHP Version : 5.6.40-64+0~20230107.71+debian10~1.gbp673146 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/ilpnowa/../baltic/web/scripts/../modules/views/plugins/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
/**
* @file
* Definition of views_plugin_pager_mini.
*/
/**
* The plugin to handle mini pager.
*
* @ingroup views_pager_plugins
*/
class views_plugin_pager_mini extends views_plugin_pager_full {
function summary_title() {
if (!empty($this->options['offset'])) {
return format_plural($this->options['items_per_page'], 'Mini pager, @count item, skip @skip', 'Mini pager, @count items, skip @skip', array('@count' => $this->options['items_per_page'], '@skip' => $this->options['offset']));
}
return format_plural($this->options['items_per_page'], 'Mini pager, @count item', 'Mini pager, @count items', array('@count' => $this->options['items_per_page']));
}
/**
* Overrides views_plugin_pager_full::option_definition().
*
* Overrides the full pager options form by deleting unused settings.
*/
function option_definition() {
$options = parent::option_definition();
unset($options['quantity']);
unset($options['tags']['first']);
unset($options['tags']['last']);
$options['tags']['previous']['default'] = '‹‹';
$options['tags']['next']['default'] = '››';
return $options;
}
/**
* Overrides views_plugin_pager_full::options_form().
*
* Overrides the full pager options form by deleting unused settings.
*/
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
unset($form['quantity']);
unset($form['tags']['first']);
unset($form['tags']['last']);
}
/**
* Overrides views_plugin_pager_full::render().
*
* Overrides the full pager renderer by changing the theme function
* and leaving out variables that are not used in the mini pager.
*/
function render($input) {
$pager_theme = views_theme_functions('views_mini_pager', $this->view, $this->display);
// The 1, 3 index are correct.
// @see theme_pager().
$tags = array(
1 => $this->options['tags']['previous'],
3 => $this->options['tags']['next'],
);
return theme($pager_theme, array(
'tags' => $tags,
'element' => $this->get_pager_id(),
'parameters' => $input,
));
}
}