Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/modules/aggregator/views_plugin_row_aggregator_rss.inc | ||
---|---|---|
2 | 2 |
|
3 | 3 |
/** |
4 | 4 |
* @file |
5 |
* Contains the Aggregator Item RSS row style plugin.
|
|
5 |
* Definition of views_plugin_row_aggregator_rss.
|
|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
/** |
9 | 9 |
* Plugin which loads an aggregator item and formats it as an RSS item. |
10 | 10 |
*/ |
11 | 11 |
class views_plugin_row_aggregator_rss extends views_plugin_row { |
12 |
var $base_table = 'aggregator_item'; |
|
13 |
var $base_field = 'iid'; |
|
14 | 12 |
|
15 |
function option_definition() { |
|
13 |
/** |
|
14 |
* |
|
15 |
*/ |
|
16 |
public $base_table = 'aggregator_item'; |
|
17 |
|
|
18 |
/** |
|
19 |
* |
|
20 |
*/ |
|
21 |
public $base_field = 'iid'; |
|
22 |
|
|
23 |
/** |
|
24 |
* {@inheritdoc} |
|
25 |
*/ |
|
26 |
public function option_definition() { |
|
16 | 27 |
$options = parent::option_definition(); |
17 | 28 |
|
18 | 29 |
$options['item_length'] = array('default' => 'default'); |
... | ... | |
20 | 31 |
return $options; |
21 | 32 |
} |
22 | 33 |
|
23 |
function options_form(&$form, &$form_state) { |
|
34 |
/** |
|
35 |
* {@inheritdoc} |
|
36 |
*/ |
|
37 |
public function options_form(&$form, &$form_state) { |
|
24 | 38 |
$form['item_length'] = array( |
25 | 39 |
'#type' => 'select', |
26 | 40 |
'#title' => t('Display type'), |
... | ... | |
34 | 48 |
); |
35 | 49 |
} |
36 | 50 |
|
37 |
function render($row) { |
|
51 |
/** |
|
52 |
* {@inheritdoc} |
|
53 |
*/ |
|
54 |
public function render($row) { |
|
38 | 55 |
$iid = $row->{$this->field_alias}; |
39 | 56 |
$sql = "SELECT ai.iid, ai.fid, ai.title, ai.link, ai.author, ai.description, "; |
40 | 57 |
$sql .= "ai.timestamp, ai.guid, af.title AS feed_title, ai.link AS feed_LINK "; |
... | ... | |
71 | 88 |
'row' => $item |
72 | 89 |
)); |
73 | 90 |
} |
91 |
|
|
74 | 92 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules