public function getPath() { if (null === $this->parent) { return ''; } $parent = $this->parent->getPath(); if ($parent === '') { return $this->name; } return $parent . '/' . $this->name; }