function getParentUntilRoot() { $this->loadCache(); if (isset($this->cache['parents_until_root'])) { if (is_array($this->cache['parents_until_root'])) { global $thinkedit; foreach ($this->cache['parents_until_root'] as $parent) { $parents[] = $thinkedit->newNode($this->table, $parent); } return $parents; } else { return false; } } else { $parents = parent::getParentUntilRoot(); if (is_array($parents)) { foreach ($parents as $parent) { $this->cache['parents_until_root'][] = $parent->getId(); } } else { $this->cache['parents_until_root'] = false; } $this->saveCache(); return $parents; } }