Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/handlers/views_handler_area_result.inc | ||
---|---|---|
12 | 12 |
*/ |
13 | 13 |
class views_handler_area_result extends views_handler_area { |
14 | 14 |
|
15 |
function option_definition() { |
|
15 |
/** |
|
16 |
* {@inheritdoc} |
|
17 |
*/ |
|
18 |
public function option_definition() { |
|
16 | 19 |
$options = parent::option_definition(); |
17 | 20 |
|
18 | 21 |
$options['content'] = array( |
... | ... | |
23 | 26 |
return $options; |
24 | 27 |
} |
25 | 28 |
|
26 |
function options_form(&$form, &$form_state) { |
|
29 |
/** |
|
30 |
* {@inheritdoc} |
|
31 |
*/ |
|
32 |
public function options_form(&$form, &$form_state) { |
|
27 | 33 |
parent::options_form($form, $form_state); |
28 | 34 |
$variables = array( |
29 | 35 |
'items' => array( |
... | ... | |
47 | 53 |
); |
48 | 54 |
} |
49 | 55 |
|
50 |
|
|
51 | 56 |
/** |
52 | 57 |
* Find out the information to render. |
53 | 58 |
*/ |
54 |
function render($empty = FALSE) { |
|
59 |
public function render($empty = FALSE) {
|
|
55 | 60 |
// Must have options and does not work on summaries. |
56 | 61 |
if (!isset($this->options['content']) || $this->view->plugin_name == 'default_summary') { |
57 | 62 |
return; |
... | ... | |
61 | 66 |
// Calculate the page totals. |
62 | 67 |
$current_page = (int) $this->view->get_current_page() + 1; |
63 | 68 |
$per_page = (int) $this->view->get_items_per_page(); |
64 |
// @TODO: Maybe use a possible is views empty functionality.
|
|
69 |
// @todo Maybe use a possible is views empty functionality.
|
|
65 | 70 |
// Not every view has total_rows set, use view->result instead. |
66 | 71 |
$total = isset($this->view->total_rows) ? $this->view->total_rows : count($this->view->result); |
67 | 72 |
$name = check_plain($this->view->human_name); |
... | ... | |
81 | 86 |
} |
82 | 87 |
$current_record_count = ($end - $start) + 1; |
83 | 88 |
// Get the search information. |
84 |
$items = array('start', 'end', 'total', 'name', 'per_page', 'current_page', 'current_record_count', 'page_count'); |
|
89 |
$items = array( |
|
90 |
'start', |
|
91 |
'end', |
|
92 |
'total', |
|
93 |
'name', |
|
94 |
'per_page', |
|
95 |
'current_page', |
|
96 |
'current_record_count', |
|
97 |
'page_count', |
|
98 |
); |
|
85 | 99 |
$replacements = array(); |
86 | 100 |
foreach ($items as $item) { |
87 | 101 |
$replacements["@$item"] = ${$item}; |
... | ... | |
92 | 106 |
} |
93 | 107 |
return $output; |
94 | 108 |
} |
109 |
|
|
95 | 110 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules