/** * @param \SKL\Post\Domain\Model\Category $newCategory * @return void */ public function createAction(Category $newCategory) { $this->categoryRepository->add($newCategory); $this->addFlashMessage('Created a new category.'); $this->redirect('index'); }