views_natural_sort.views.inc 732 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<?php
/**
 * @file
 * Views related hooks.
 *
 * Automatically included by views. Because of the nature of this module this
 * is most of the code.
 */

/**
 * Implementation of hook_views_data().
 */
function views_natural_sort_views_data() {

  $data['views_natural_sort']['table']['join'] = array(
    'node' => array(
      'left_field' => 'nid',
18
      'field' => 'eid',
19 20
      'extra' => array(
        array(
21 22
          'field' => 'entity_type',
          'value' => 'node',
23 24 25 26
        )
      )
    ),
  );
27 28
  return $data;
}
29

30
function views_natural_sort_views_data_alter(&$data) {
31

32 33
  // TODO: Add a field and argument handler to support grouping.
  $data['node']['title']['sort']['handler'] = 'views_natural_sort_handler_sort';
34
}