You are here

public function ForumManager::getParents in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/forum/src/ForumManager.php \Drupal\forum\ForumManager::getParents()

Fetches the parent forums for a given forum.

Parameters

int $tid: Term ID.

Return value

array Array of parent terms.

Overrides ForumManagerInterface::getParents

Deprecated

Scheduled to be removed in 9.0.x, see https://www.drupal.org/node/2371593.

File

core/modules/forum/src/ForumManager.php, line 465
Contains \Drupal\forum\ForumManager.

Class

ForumManager
Provides forum manager service.

Namespace

Drupal\forum

Code

public function getParents($tid) {
  return $this->entityManager
    ->getStorage('taxonomy_term')
    ->loadAllParents($tid);
}