You are here

function lineage_string in Taxonomy Lineage 6

Same name and namespace in other branches
  1. 5 lineage.module \lineage_string()
  2. 7 lineage.module \lineage_string()
3 calls to lineage_string()
lineage_update_term in ./lineage.module
lineage_update_term_r in ./lineage.module
_lineage_get_parent_lineage in ./lineage.module

File

./lineage.module, line 223

Code

function lineage_string($term) {

  // Ensure positive weights with enough digits so that all sort properly.
  $w = _lineage_weights($term->vid);
  return sprintf("%0" . $w['digits'] . "d", $term->weight + $w['offset']) . "-" . $term->name . "\n";
}