Projet

Général

Profil

Révision 5d12d676

Ajouté par Assos Assos il y a environ 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/views/modules/node/views_handler_field_node_path.inc
2 2

  
3 3
/**
4 4
 * @file
5
 * Handler for node path field.
5
 * Definition of views_handler_field_node_path.
6 6
 */
7 7

  
8 8
/**
......
12 12
 */
13 13
class views_handler_field_node_path extends views_handler_field {
14 14

  
15
  function option_definition() {
15
  /**
16
   * {@inheritdoc}
17
   */
18
  public function option_definition() {
16 19
    $options = parent::option_definition();
17 20
    $options['absolute'] = array('default' => FALSE, 'bool' => TRUE);
18 21

  
19 22
    return $options;
20 23
  }
21 24

  
22
  function construct() {
25
  /**
26
   * {@inheritdoc}
27
   */
28
  public function construct() {
23 29
    parent::construct();
24 30
    $this->additional_fields['nid'] = 'nid';
25 31
  }
26 32

  
27
  function options_form(&$form, &$form_state) {
33
  /**
34
   * {@inheritdoc}
35
   */
36
  public function options_form(&$form, &$form_state) {
28 37
    parent::options_form($form, $form_state);
29 38
    $form['absolute'] = array(
30 39
      '#type' => 'checkbox',
......
35 44
    );
36 45
  }
37 46

  
38
  function query() {
47
  /**
48
   * {@inheritdoc}
49
   */
50
  public function query() {
39 51
    $this->ensure_my_table();
40 52
    $this->add_additional_fields();
41 53
  }
42 54

  
43
  function render($values) {
55
  /**
56
   * {@inheritdoc}
57
   */
58
  public function render($values) {
44 59
    $nid = $this->get_value($values, 'nid');
45 60
    return url("node/$nid", array('absolute' => $this->options['absolute']));
46 61
  }
62

  
47 63
}

Formats disponibles : Unified diff