/** * Compute all Sosa ancestors from the user's root individual. * @return bool Result of the computation */ public function computeAll() { $root_id = $this->tree->getUserPreference($this->user, 'MAJ_SOSA_ROOT_ID'); $indi = Individual::getInstance($root_id, $this->tree); if ($indi) { $this->sosa_provider->deleteAll(); $this->addNode($indi, 1); $this->flushTmpSosaTable(true); return true; } return false; }
/** * Return the root individual ID for the reference tree and user. * @return string Individual ID */ public function getRootIndiId() { return $this->tree->getUserPreference($this->user, 'MAJ_SOSA_ROOT_ID'); }