Skip to content
Snippets Groups Projects
Select Git revision
  • ec6ee013cfb8ec9c98c3a1f2180cc532e33501ba
  • master default protected
  • php84
  • ll-api-test
  • 6.x
  • release_6.2.0
  • modif_maintenance_phtml
  • 6.0.x
  • detached2
  • detached
  • php82
  • feature_SearchAndSelectFilter
  • 5.x
  • 4.x
  • 7.2.1
  • 7.2.0
  • 6.2.0
  • 7.1.0
  • 7.0.0
  • 1.1.1
  • 6.1.7
  • 6.1.6
  • 6.1.5
  • 6.0.16
  • 6.0.15
  • 6.1.4
  • 6.0.14
  • 6.1.3
  • 6.0.13
  • 6.1.2
  • 6.0.12
  • 6.1.1
  • 6.1.0
  • 6.0.11
34 results

Javascript.md

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    IndicateurControllerFactory.php 1.54 KiB
    <?php
    
    namespace UnicaenIndicateur\Controller;
    
    use Psr\Container\ContainerExceptionInterface;
    use Psr\Container\NotFoundExceptionInterface;
    use UnicaenIndicateur\Form\Indicateur\IndicateurForm;
    use UnicaenIndicateur\Service\Abonnement\AbonnementService;
    use UnicaenIndicateur\Service\Indicateur\IndicateurService;
    use Interop\Container\ContainerInterface;
    use UnicaenUtilisateur\Service\User\UserService;;
    
    class IndicateurControllerFactory {
    
        /**
         * @param ContainerInterface $container
         * @return IndicateurController
         * @throws ContainerExceptionInterface
         * @throws NotFoundExceptionInterface
         */
        public function __invoke(ContainerInterface $container) : IndicateurController
        {
            /**
             * @var AbonnementService $abonnementService
             * @var IndicateurService $indicateurService
             * @var UserService $userService
             */
            $abonnementService = $container->get(AbonnementService::class);
            $indicateurService = $container->get(IndicateurService::class);
            $userService = $container->get(UserService::class);
    
            /**
             * @var IndicateurForm $indicateurForm
             */
            $indicateurForm = $container->get('FormElementManager')->get(IndicateurForm::class);
    
            $controller = new IndicateurController();
            $controller->setAbonnementService($abonnementService);
            $controller->setIndicateurService($indicateurService);
            $controller->setUserService($userService);
            $controller->setIndicateurForm($indicateurForm);
            return $controller;
        }
    }