Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/modules/user/views_handler_field_user_mail.inc | ||
---|---|---|
11 | 11 |
* @ingroup views_field_handlers |
12 | 12 |
*/ |
13 | 13 |
class views_handler_field_user_mail extends views_handler_field_user { |
14 |
function option_definition() { |
|
14 |
|
|
15 |
/** |
|
16 |
* {@inheritdoc} |
|
17 |
*/ |
|
18 |
public function option_definition() { |
|
15 | 19 |
$options = parent::option_definition(); |
16 | 20 |
$options['link_to_user'] = array('default' => 'mailto'); |
17 | 21 |
return $options; |
18 | 22 |
} |
19 | 23 |
|
20 |
function options_form(&$form, &$form_state) { |
|
24 |
/** |
|
25 |
* {@inheritdoc} |
|
26 |
*/ |
|
27 |
public function options_form(&$form, &$form_state) { |
|
21 | 28 |
parent::options_form($form, $form_state); |
22 | 29 |
$form['link_to_user'] = array( |
23 | 30 |
'#title' => t('Link this field'), |
... | ... | |
31 | 38 |
); |
32 | 39 |
} |
33 | 40 |
|
34 |
function render_link($data, $values) { |
|
41 |
/** |
|
42 |
* {@inheritdoc} |
|
43 |
*/ |
|
44 |
public function render_link($data, $values) { |
|
35 | 45 |
parent::render_link($data, $values); |
36 | 46 |
|
37 | 47 |
if ($this->options['link_to_user'] == 'mailto') { |
... | ... | |
41 | 51 |
|
42 | 52 |
return $data; |
43 | 53 |
} |
54 |
|
|
44 | 55 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules