public function hasChildren() { if (!$this->getRepository()) { return false; } return $this->getRepository()->hasChildren($this->getRepositoryPath()); }