Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/modules/filter/views_handler_field_filter_format_name.inc | ||
---|---|---|
2 | 2 |
|
3 | 3 |
/** |
4 | 4 |
* @file |
5 |
* Definition of views_handler_field_filter_format_name.
|
|
5 |
* Contains .
|
|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
/** |
... | ... | |
11 | 11 |
* @ingroup views_field_handlers |
12 | 12 |
*/ |
13 | 13 |
class views_handler_field_filter_format_name extends views_handler_field { |
14 |
function construct() { |
|
14 |
|
|
15 |
/** |
|
16 |
* {@inheritdoc} |
|
17 |
*/ |
|
18 |
public function construct() { |
|
15 | 19 |
parent::construct(); |
16 | 20 |
// Be explicit about the table we are using. |
17 | 21 |
$this->additional_fields['name'] = array('table' => 'filter_formats', 'field' => 'name'); |
18 | 22 |
} |
19 | 23 |
|
20 |
function query() { |
|
24 |
/** |
|
25 |
* {@inheritdoc} |
|
26 |
*/ |
|
27 |
public function query() { |
|
21 | 28 |
$this->ensure_my_table(); |
22 | 29 |
$this->add_additional_fields(); |
23 | 30 |
} |
24 | 31 |
|
25 |
function render($values) { |
|
32 |
/** |
|
33 |
* {@inheritdoc} |
|
34 |
*/ |
|
35 |
public function render($values) { |
|
26 | 36 |
$format_name = $this->get_value($values, 'name'); |
27 | 37 |
if (!$format_name) { |
28 | 38 |
// Default or invalid input format. |
... | ... | |
33 | 43 |
} |
34 | 44 |
return $this->sanitize_value($format_name); |
35 | 45 |
} |
46 |
|
|
36 | 47 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules