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_sort_menu_hierarchy.inc
17 17
 * @ingroup views_sort_handlers
18 18
 */
19 19
class views_handler_sort_menu_hierarchy extends views_handler_sort {
20
  function option_definition() {
20

  
21
  /**
22
   * {@inheritdoc}
23
   */
24
  public function option_definition() {
21 25
    $options = parent::option_definition();
22 26
    $options['sort_within_level'] = array('default' => FALSE);
23 27
    return $options;
24 28
  }
25 29

  
26
  function options_form(&$form, &$form_state) {
30
  /**
31
   * {@inheritdoc}
32
   */
33
  public function options_form(&$form, &$form_state) {
27 34
    parent::options_form($form, $form_state);
28 35
    $form['sort_within_level'] = array(
29 36
      '#type' => 'checkbox',
......
33 40
    );
34 41
  }
35 42

  
36
  function query() {
43
  /**
44
   * {@inheritdoc}
45
   */
46
  public function query() {
37 47
    $this->ensure_my_table();
38 48
    $max_depth = isset($this->definition['max depth']) ? $this->definition['max depth'] : MENU_MAX_DEPTH;
39 49
    for ($i = 1; $i <= $max_depth; ++$i) {
......
51 61
      $this->query->add_orderby($this->table_alias, $this->field . $i, $this->options['order']);
52 62
    }
53 63
  }
64

  
54 65
}

Formats disponibles : Unified diff