mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-19 00:28:47 +02:00
N°2435.1 Portal: Split portal composer.json in 2
- Autoloader for portal files in the itop-portal-base module - Dependencies moved to root composer.json - Add autoloader for /core and /application content
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Controller;
|
||||
|
||||
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
|
||||
use Symfony\Component\Form\FormFactoryInterface;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
use Symfony\Component\Routing\RouterInterface;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
|
||||
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
|
||||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
use Symfony\Component\Templating\EngineInterface;
|
||||
use Twig\Environment;
|
||||
|
||||
/**
|
||||
* Provides common features needed in controllers.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
abstract class AbstractController implements ServiceSubscriberInterface
|
||||
{
|
||||
use ControllerTrait;
|
||||
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
protected $container;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @required
|
||||
*/
|
||||
public function setContainer(ContainerInterface $container)
|
||||
{
|
||||
$previous = $this->container;
|
||||
$this->container = $container;
|
||||
|
||||
return $previous;
|
||||
}
|
||||
|
||||
public static function getSubscribedServices()
|
||||
{
|
||||
return [
|
||||
'router' => '?'.RouterInterface::class,
|
||||
'request_stack' => '?'.RequestStack::class,
|
||||
'http_kernel' => '?'.HttpKernelInterface::class,
|
||||
'serializer' => '?'.SerializerInterface::class,
|
||||
'session' => '?'.SessionInterface::class,
|
||||
'security.authorization_checker' => '?'.AuthorizationCheckerInterface::class,
|
||||
'templating' => '?'.EngineInterface::class,
|
||||
'twig' => '?'.Environment::class,
|
||||
'doctrine' => '?'.ManagerRegistry::class,
|
||||
'form.factory' => '?'.FormFactoryInterface::class,
|
||||
'security.token_storage' => '?'.TokenStorageInterface::class,
|
||||
'security.csrf.token_manager' => '?'.CsrfTokenManagerInterface::class,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user