public function setCategory(Category $category) { $category->addCategoryContent($this); $this->category = $category; }