You are here

protected function EntityShareTaxonomyExport::getFullyLoadedTerm in Entity Share 7

Load a term with parent infos.

Parameters

int $tid: Term Id to load.

Return value

mixed The term entity.

3 calls to EntityShareTaxonomyExport::getFullyLoadedTerm()
EntityShareTaxonomyExport::exportTerm in modules/entity_share_taxonomy/includes/entity_share_taxonomy.export.inc
Export the term.
EntityShareTaxonomyExport::getParentsTerm in modules/entity_share_taxonomy/includes/entity_share_taxonomy.export.inc
Get the parents of a term.
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 45
Class for handling taxonomy Export.

Class

EntityShareTaxonomyExport
A class to export the taxonomy term.

Code

protected function getFullyLoadedTerm($tid) {
  $term_ori = taxonomy_term_load($tid);
  $vocabulary = entity_share_taxonomy_get_tree_all_language($term_ori->vid, 0, NULL, TRUE);
  foreach ($vocabulary as $term) {
    if ($term->tid == $tid) {
      $field_export = new EntityShareEntityExport($term);
      $term = $field_export
        ->execute();
      $term = $this
        ->cleanTaxonomyTermExport($term);
      return $term;
    }
  }
}