public function getCategoryName() { return $this->category === null ? '---' : $this->category->name; }