public function getFamily() { if (isset($this->family)) { return $this->family->getName(); } return $this->getName(); }