Created
February 25, 2011 17:20
-
-
Save pjedrzejewski/844122 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$form = $this->get('sylius.assortment.form.category'); | |
$category = $this->get('sylius.assortment.manager')->createCategory(); | |
$form->bind($this->get('request'), $category); | |
if ($form->isValid()) { | |
$this->get('sylius.assortment.manager')->addCategory($category); | |
return new RedirectResponse($this->get('router')->generate('homepage')); | |
} | |
return $this->render('SyliusAssortmentBundle:Category:new.html.twig', array('form' => $form)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment