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/handlers/views_handler_field_entity.inc
11 11
 * Fields based upon this handler work with all query-backends if the tables
12 12
 * used by the query backend have an 'entity type' specified. In order to
13 13
 * make fields based upon this handler automatically available to all compatible
14
 * query backends, the views field can be defined in the table
14
 * query backends, the views field can be defined in the table.
15 15
 * @code views_entity_{ENTITY_TYPE} @endcode.
16 16
 *
17 17
 * @ingroup views_field_handlers
......
47 47
  /**
48 48
   * Overriden to add the field for the entity id.
49 49
   */
50
  function query() {
50
  public function query() {
51 51
    $this->table_alias = $base_table = $this->view->base_table;
52 52
    $this->base_field = $this->view->base_field;
53 53

  
......
75 75
  /**
76 76
   * Load the entities for all rows that are about to be displayed.
77 77
   */
78
  function pre_render(&$values) {
78
  public function pre_render(&$values) {
79 79
    if (!empty($values)) {
80 80
      list($this->entity_type, $this->entities) = $this->query->get_result_entities($values, !empty($this->relationship) ? $this->relationship : NULL, $this->field_alias);
81 81
    }
82 82
  }
83 83

  
84 84
  /**
85
   * Overridden to return the entity object, or a certain property of the entity.
85
   * Return the entity object or a certain property of the entity.
86 86
   */
87
  function get_value($values, $field = NULL) {
87
  public function get_value($values, $field = NULL) {
88 88
    if (isset($this->entities[$this->view->row_index])) {
89 89
      $entity = $this->entities[$this->view->row_index];
90 90
      // Support to get a certain part of the entity.
......
101 101
    }
102 102
    return FALSE;
103 103
  }
104

  
104 105
}

Formats disponibles : Unified diff