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_type.inc
11 11
 * @ingroup views_field_handlers
12 12
 */
13 13
class views_handler_field_node_type extends views_handler_field_node {
14
  function option_definition() {
14

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

  
......
21 25
  /**
22 26
   * Provide machine_name option for to node type display.
23 27
   */
24
  function options_form(&$form, &$form_state) {
28
  public function options_form(&$form, &$form_state) {
25 29
    parent::options_form($form, $form_state);
26 30

  
27 31
    $form['machine_name'] = array(
......
33 37
  }
34 38

  
35 39
  /**
36
    * Render node type as human readable name, unless using machine_name option.
37
    */
38
  function render_name($data, $values) {
40
   * Render node type as human readable name, unless using machine_name option.
41
   */
42
  public function render_name($data, $values) {
39 43
    if ($this->options['machine_name'] != 1 && $data !== NULL && $data !== '') {
40 44
      return t($this->sanitize_value(node_type_get_name($data)));
41 45
    }
42 46
    return $this->sanitize_value($data);
43 47
  }
44 48

  
45
  function render($values) {
49
  /**
50
   * {@inheritdoc}
51
   */
52
  public function render($values) {
46 53
    $value = $this->get_value($values);
47 54
    return $this->render_link($this->render_name($value, $values), $values);
48 55
  }
56

  
49 57
}

Formats disponibles : Unified diff