You are here

protected function EntityShareTaxonomyExport::getParentsTerm in Entity Share 7

Get the parents of a term.

Parameters

object $term: Term to extract parent.

Return value

bool|array Array of the parent terms or FALSE if no parent.

1 call to EntityShareTaxonomyExport::getParentsTerm()
EntityShareTaxonomyExport::loadParentTree in modules/entity_share_taxonomy/includes/entity_share_taxonomy.export.inc
Load the parent tree.

File

modules/entity_share_taxonomy/includes/entity_share_taxonomy.export.inc, line 83
Class for handling taxonomy Export.

Class

EntityShareTaxonomyExport
A class to export the taxonomy term.

Code

protected function getParentsTerm($term) {
  if (!isset($term->parents)) {
    $term = $this
      ->getFullyLoadedTerm($term->tid);
  }
  return $term->parents;
}