Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/plugins/views_plugin_style_rss.inc | ||
---|---|---|
2 | 2 |
|
3 | 3 |
/** |
4 | 4 |
* @file |
5 |
* Contains the RSS style plugin.
|
|
5 |
* Definition of views_plugin_style_rss.
|
|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
/** |
... | ... | |
11 | 11 |
* @ingroup views_style_plugins |
12 | 12 |
*/ |
13 | 13 |
class views_plugin_style_rss extends views_plugin_style { |
14 |
function attach_to($display_id, $path, $title) { |
|
14 |
|
|
15 |
/** |
|
16 |
* |
|
17 |
*/ |
|
18 |
public function attach_to($display_id, $path, $title) { |
|
15 | 19 |
$display = $this->view->display[$display_id]->handler; |
16 | 20 |
$url_options = array(); |
17 | 21 |
$input = $this->view->get_exposed_input(); |
... | ... | |
36 | 40 |
'rel' => 'alternate', |
37 | 41 |
'type' => 'application/rss+xml', |
38 | 42 |
'title' => $title, |
39 |
'href' => $url |
|
43 |
'href' => $url,
|
|
40 | 44 |
)); |
41 | 45 |
} |
42 | 46 |
} |
43 | 47 |
|
44 |
function option_definition() { |
|
48 |
/** |
|
49 |
* {@inheritdoc} |
|
50 |
*/ |
|
51 |
public function option_definition() { |
|
45 | 52 |
$options = parent::option_definition(); |
46 | 53 |
|
47 | 54 |
$options['description'] = array('default' => '', 'translatable' => TRUE); |
... | ... | |
49 | 56 |
return $options; |
50 | 57 |
} |
51 | 58 |
|
52 |
function options_form(&$form, &$form_state) { |
|
59 |
/** |
|
60 |
* {@inheritdoc} |
|
61 |
*/ |
|
62 |
public function options_form(&$form, &$form_state) { |
|
53 | 63 |
parent::options_form($form, $form_state); |
54 | 64 |
|
55 | 65 |
$form['description'] = array( |
... | ... | |
67 | 77 |
* @return |
68 | 78 |
* An array that can be passed to format_xml_elements(). |
69 | 79 |
*/ |
70 |
function get_channel_elements() { |
|
80 |
public function get_channel_elements() {
|
|
71 | 81 |
return array(); |
72 | 82 |
} |
73 | 83 |
|
... | ... | |
80 | 90 |
* @return |
81 | 91 |
* An array that can be passed to format_xml_elements(). |
82 | 92 |
*/ |
83 |
function get_channel_elements_atom_link() { |
|
93 |
public function get_channel_elements_atom_link() {
|
|
84 | 94 |
$url_options = array('absolute' => TRUE); |
85 | 95 |
$input = $this->view->get_exposed_input(); |
86 | 96 |
if ($input) { |
... | ... | |
107 | 117 |
* @return string |
108 | 118 |
* The string containing the description with the tokens replaced. |
109 | 119 |
*/ |
110 |
function get_description() { |
|
120 |
public function get_description() {
|
|
111 | 121 |
$description = $this->options['description']; |
112 | 122 |
|
113 | 123 |
// Allow substitutions from the first row. |
... | ... | |
116 | 126 |
return $description; |
117 | 127 |
} |
118 | 128 |
|
119 |
function render() { |
|
129 |
/** |
|
130 |
* {@inheritdoc} |
|
131 |
*/ |
|
132 |
public function render() { |
|
120 | 133 |
if (empty($this->row_plugin)) { |
121 | 134 |
vpr('views_plugin_style_default: Missing row plugin'); |
122 | 135 |
return; |
... | ... | |
148 | 161 |
array( |
149 | 162 |
'view' => $this->view, |
150 | 163 |
'options' => $this->options, |
151 |
'rows' => $rows |
|
164 |
'rows' => $rows,
|
|
152 | 165 |
)); |
153 | 166 |
unset($this->view->row_index); |
154 | 167 |
return $output; |
155 | 168 |
} |
169 |
|
|
156 | 170 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules