You are here

public function ForumManager::getParents in Drupal 8

Fetches the parent forums for a given forum.

Parameters

int $tid: Term ID.

Return value

array Array of parent terms.

Overrides ForumManagerInterface::getParents

Deprecated

in drupal:8.1.0 and is removed from drupal:9.0.0. Call loadAllParents() on taxonomy term storage directly.

See also

https://www.drupal.org/node/3069599

File

core/modules/forum/src/ForumManager.php, line 482

Class

ForumManager
Provides forum manager service.

Namespace

Drupal\forum

Code

public function getParents($tid) {
  @trigger_error(__NAMESPACE__ . '\\ForumManager::getParents() is deprecated in drupal:8.1.0 and is removed from drupal:9.0.0. Call loadAllParents() on taxonomy term storage directly. See https://www.drupal.org/node/3069599', E_USER_DEPRECATED);
  return $this->entityTypeManager
    ->getStorage('taxonomy_term')
    ->loadAllParents($tid);
}