Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/handlers/views_handler_field_markup.inc | ||
---|---|---|
10 | 10 |
* format field. |
11 | 11 |
* |
12 | 12 |
* - format: (REQUIRED) Either a string format id to use for this field or an |
13 |
* array('field' => {$field}) where $field is the field in this table
|
|
14 |
* used to control the format such as the 'format' field in the node,
|
|
15 |
* which goes with the 'body' field.
|
|
13 |
* array('field' => {$field}) where $field is the field in this table used to
|
|
14 |
* control the format such as the 'format' field in the node, which goes with
|
|
15 |
* the 'body' field. |
|
16 | 16 |
* |
17 | 17 |
* @ingroup views_field_handlers |
18 | 18 |
*/ |
19 | 19 |
class views_handler_field_markup extends views_handler_field { |
20 |
|
|
20 | 21 |
/** |
21 |
* Constructor; calls to base object constructor.
|
|
22 |
* {@inheritdoc}
|
|
22 | 23 |
*/ |
23 |
function construct() { |
|
24 |
public function construct() {
|
|
24 | 25 |
parent::construct(); |
25 | 26 |
|
26 | 27 |
$this->format = $this->definition['format']; |
... | ... | |
31 | 32 |
} |
32 | 33 |
} |
33 | 34 |
|
34 |
function render($values) { |
|
35 |
/** |
|
36 |
* {@inheritdoc} |
|
37 |
*/ |
|
38 |
public function render($values) { |
|
35 | 39 |
$value = $this->get_value($values); |
36 | 40 |
if (is_array($this->format)) { |
37 | 41 |
$format = $this->get_value($values, 'format'); |
... | ... | |
45 | 49 |
} |
46 | 50 |
} |
47 | 51 |
|
48 |
function element_type($none_supported = FALSE, $default_empty = FALSE, $inline = FALSE) { |
|
52 |
/** |
|
53 |
* {@inheritdoc} |
|
54 |
*/ |
|
55 |
public function element_type($none_supported = FALSE, $default_empty = FALSE, $inline = FALSE) { |
|
49 | 56 |
if ($inline) { |
50 | 57 |
return 'span'; |
51 | 58 |
} |
... | ... | |
56 | 63 |
|
57 | 64 |
return 'div'; |
58 | 65 |
} |
66 |
|
|
59 | 67 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules