Commit 2221057f authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Corrections pour passer à ZF3.

parent 400c87f6
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -2,10 +2,10 @@

namespace UnicaenFaq\Controller\Factory;

use Interop\Container\ContainerInterface;
use UnicaenFaq\Controller\FaqController;
use UnicaenFaq\Form\FaqForm;
use UnicaenFaq\Service\FaqService;
use Zend\Mvc\Controller\ControllerManager;
use Zend\ServiceManager\ServiceLocatorInterface;

class FaqControllerFactory
@@ -13,15 +13,15 @@ class FaqControllerFactory
    /**
     * Create service
     *
     * @param ControllerManager $controllerManager
     * @param ContainerInterface $container
     * @return FaqController
     */
    public function __invoke(ControllerManager $controllerManager)
    public function __invoke(ContainerInterface $container)
    {
        $faqService = $this->getFaqService($controllerManager);
        $faqService = $this->getFaqService($container);

        /** @var FaqForm $form */
        $form = $controllerManager->get('FormElementManager')->get('UnicaenFaq\Form\FaqForm');
        $form = $container->get('FormElementManager')->get('UnicaenFaq\Form\FaqForm');

        $controller = new FaqController($form);
        $controller->setFaqService($faqService);