You are here

function _lexicon_tree_sort in Lexicon 7

Sort callback function to sort vocabulary trees alphabetically on term name.

1 string reference to '_lexicon_tree_sort'
_lexicon_overview in includes/lexicon.pages.inc
Lexicon overview function that creates all the data end renders the output through the various theme templates.

File

includes/lexicon.pages.inc, line 327
Page callbacks for the Lexicon module

Code

function _lexicon_tree_sort($a, $b) {
  if (drupal_strtolower($a->name) == drupal_strtolower($b->name)) {
    return 0;
  }
  else {
    if (drupal_strtolower($a->name) < drupal_strtolower($b->name)) {
      return -1;
    }
    else {
      return 1;
    }
  }
}