|
|
|
|
|
|
|
|
namespace Lc\CaracoleBundle\Controller\Section; |
|
|
namespace Lc\CaracoleBundle\Controller\Section; |
|
|
|
|
|
|
|
|
use Doctrine\ORM\EntityManagerInterface; |
|
|
use Doctrine\ORM\EntityManagerInterface; |
|
|
|
|
|
use Lc\CaracoleBundle\Builder\User\UserMerchantBuilder; |
|
|
use Lc\CaracoleBundle\Container\Section\SectionContainer; |
|
|
use Lc\CaracoleBundle\Container\Section\SectionContainer; |
|
|
use Lc\CaracoleBundle\Form\Section\SwitchSectionFormType; |
|
|
use Lc\CaracoleBundle\Form\Section\SwitchSectionFormType; |
|
|
use Lc\CaracoleBundle\Repository\Section\SectionRepository; |
|
|
|
|
|
use Lc\CaracoleBundle\Resolver\MerchantResolver; |
|
|
use Lc\CaracoleBundle\Resolver\MerchantResolver; |
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; |
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; |
|
|
use Symfony\Component\HttpFoundation\Request; |
|
|
use Symfony\Component\HttpFoundation\Request; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class SwitchSectionAdminController extends AbstractController |
|
|
class SwitchSectionAdminController extends AbstractController |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @Route("/section/switch", name="carac_section_switch") |
|
|
|
|
|
|
|
|
* @Route("/admin/section/switch", name="carac_section_switch") |
|
|
*/ |
|
|
*/ |
|
|
public function switchSection( |
|
|
public function switchSection( |
|
|
Request $request, |
|
|
Request $request, |
|
|
EntityManagerInterface $entityManager, |
|
|
EntityManagerInterface $entityManager, |
|
|
MerchantResolver $merchantResolver, |
|
|
MerchantResolver $merchantResolver, |
|
|
SectionContainer $sectionContainer |
|
|
|
|
|
|
|
|
SectionContainer $sectionContainer, |
|
|
|
|
|
UserMerchantBuilder $userMerchantBuilder |
|
|
) { |
|
|
) { |
|
|
$form = $this->createForm(SwitchSectionFormType::class); |
|
|
$form = $this->createForm(SwitchSectionFormType::class); |
|
|
$form->handleRequest($request); |
|
|
$form->handleRequest($request); |