Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/plugins/views_plugin_pager_mini.inc | ||
---|---|---|
11 | 11 |
* @ingroup views_pager_plugins |
12 | 12 |
*/ |
13 | 13 |
class views_plugin_pager_mini extends views_plugin_pager_full { |
14 |
function summary_title() { |
|
14 |
|
|
15 |
/** |
|
16 |
* {@inheritdoc} |
|
17 |
*/ |
|
18 |
public function summary_title() { |
|
15 | 19 |
if (!empty($this->options['offset'])) { |
16 | 20 |
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'])); |
17 | 21 |
} |
18 |
return format_plural($this->options['items_per_page'], 'Mini pager, @count item', 'Mini pager, @count items', array('@count' => $this->options['items_per_page']));
|
|
22 |
return format_plural($this->options['items_per_page'], 'Mini pager, @count item', 'Mini pager, @count items', array('@count' => $this->options['items_per_page'])); |
|
19 | 23 |
} |
20 | 24 |
|
21 | 25 |
/** |
22 |
* Overrides views_plugin_pager_full::option_definition(). |
|
23 |
* |
|
24 |
* Overrides the full pager options form by deleting unused settings. |
|
26 |
* {@inheritdoc} |
|
25 | 27 |
*/ |
26 |
function option_definition() { |
|
28 |
public function option_definition() {
|
|
27 | 29 |
$options = parent::option_definition(); |
28 | 30 |
|
31 |
// Overrides the full pager options form by deleting unused settings. |
|
29 | 32 |
unset($options['quantity']); |
30 | 33 |
unset($options['tags']['first']); |
31 | 34 |
unset($options['tags']['last']); |
... | ... | |
36 | 39 |
} |
37 | 40 |
|
38 | 41 |
/** |
39 |
* Overrides views_plugin_pager_full::options_form(). |
|
40 |
* |
|
41 |
* Overrides the full pager options form by deleting unused settings. |
|
42 |
* {@inheritdoc} |
|
42 | 43 |
*/ |
43 |
function options_form(&$form, &$form_state) { |
|
44 |
public function options_form(&$form, &$form_state) {
|
|
44 | 45 |
parent::options_form($form, $form_state); |
46 |
|
|
47 |
// Overrides the full pager options form by deleting unused settings. |
|
45 | 48 |
unset($form['quantity']); |
46 | 49 |
unset($form['tags']['first']); |
47 | 50 |
unset($form['tags']['last']); |
48 | 51 |
} |
49 | 52 |
|
50 | 53 |
/** |
51 |
* Overrides views_plugin_pager_full::render(). |
|
52 |
* |
|
53 |
* Overrides the full pager renderer by changing the theme function |
|
54 |
* and leaving out variables that are not used in the mini pager. |
|
54 |
* {@inheritdoc} |
|
55 | 55 |
*/ |
56 |
function render($input) { |
|
56 |
public function render($input) { |
|
57 |
// Overrides the full pager renderer by changing the theme function and |
|
58 |
// leaving out variables that are not used in the mini pager. |
|
57 | 59 |
$pager_theme = views_theme_functions('views_mini_pager', $this->view, $this->display); |
60 |
|
|
58 | 61 |
// The 1, 3 index are correct. |
59 | 62 |
// @see theme_pager(). |
60 | 63 |
$tags = array( |
... | ... | |
67 | 70 |
'parameters' => $input, |
68 | 71 |
)); |
69 | 72 |
} |
73 |
|
|
70 | 74 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules