@@ -14,15 +14,15 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | namespace AppBundle\Controller; |
| 16 | 16 | |
| 17 | -use Symfony\Component\HttpFoundation\Request; |
|
| 18 | 17 | use AppBundle\Controller\AbstractController; |
| 19 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
|
| 20 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
|
| 21 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
|
| 22 | 18 | use AppBundle\Entity\Article; |
| 23 | 19 | use AppBundle\Entity\Supplier; |
| 24 | -use AppBundle\Form\Type\ArticleType; |
|
| 25 | 20 | use AppBundle\Form\Type\ArticleReassignType; |
| 21 | +use AppBundle\Form\Type\ArticleType; |
|
| 22 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
|
| 23 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
|
| 24 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
|
| 25 | +use Symfony\Component\HttpFoundation\Request; |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * Article controller. |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | new ArticleReassignType(), |
| 181 | 181 | $articles, |
| 182 | 182 | array( |
| 183 | - 'action' => $this->generateUrl('articles_change',array('slug' => $supplier->getSlug())), |
|
| 183 | + 'action' => $this->generateUrl('articles_change', array('slug' => $supplier->getSlug())), |
|
| 184 | 184 | 'method' => 'PUT', |
| 185 | 185 | ) |
| 186 | 186 | ); |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | new ArticleReassignType(), |
| 212 | 212 | $articles, |
| 213 | 213 | array( |
| 214 | - 'action' => $this->generateUrl('articles_change',array('slug' => $supplier->getSlug())), |
|
| 214 | + 'action' => $this->generateUrl('articles_change', array('slug' => $supplier->getSlug())), |
|
| 215 | 215 | 'method' => 'PUT', |
| 216 | 216 | ) |
| 217 | 217 | ); |
@@ -15,15 +15,15 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | namespace AppBundle\Entity; |
| 17 | 17 | |
| 18 | -use Doctrine\ORM\Mapping as ORM; |
|
| 19 | -use Symfony\Component\Validator\Constraints as Assert; |
|
| 20 | -use Gedmo\Mapping\Annotation as Gedmo; |
|
| 21 | -use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; |
|
| 22 | -use Doctrine\Common\Collections\ArrayCollection; |
|
| 18 | +use AppBundle\Entity\FamilyLog; |
|
| 23 | 19 | use AppBundle\Entity\Supplier; |
| 24 | 20 | use AppBundle\Entity\UnitStorage; |
| 25 | 21 | use AppBundle\Entity\ZoneStorage; |
| 26 | -use AppBundle\Entity\FamilyLog; |
|
| 22 | +use Doctrine\Common\Collections\ArrayCollection; |
|
| 23 | +use Doctrine\ORM\Mapping as ORM; |
|
| 24 | +use Gedmo\Mapping\Annotation as Gedmo; |
|
| 25 | +use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; |
|
| 26 | +use Symfony\Component\Validator\Constraints as Assert; |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * Article. |
@@ -41,14 +41,14 @@ |
||
| 41 | 41 | { |
| 42 | 42 | $builder->addEventListener( |
| 43 | 43 | FormEvents::PRE_SET_DATA, |
| 44 | - function (FormEvent $event) { |
|
| 44 | + function(FormEvent $event) { |
|
| 45 | 45 | $form = $event->getForm(); |
| 46 | 46 | $articles = $event->getData(); |
| 47 | 47 | |
| 48 | 48 | $formOptions = array( |
| 49 | 49 | 'class' => 'GlsrGestockBundle:Supplier', |
| 50 | 50 | 'query_builder' => |
| 51 | - function (EntityRepository $er) use ($articles) { |
|
| 51 | + function(EntityRepository $er) use ($articles) { |
|
| 52 | 52 | return $er->getSupplierForReassign($articles[0]); |
| 53 | 53 | }, |
| 54 | 54 | 'multiple' => false, |