public function getLevel() { if (is_null($this->getParentId())) { return 0; } return $this->computeLevel(); }