Replace deprecated extends Controller by AbstractController

This commit is contained in:
Mathieu Jaumotte 2021-02-01 18:17:33 +01:00
parent ea0ac6dc66
commit d840deb5e2
13 changed files with 66 additions and 39 deletions

View File

@ -21,15 +21,17 @@
namespace Chill\MainBundle\Controller; namespace Chill\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
/** /**
* * Class AdminController
* *
* @package Chill\MainBundle\Controller
* @author julien.fastre@champs-libres.coop * @author julien.fastre@champs-libres.coop
* @author marc@champs-libres.coop * @author marc@champs-libres.coop
*/ */
class AdminController extends Controller { class AdminController extends AbstractController
{
public function indexAction($menu = 'admin', public function indexAction($menu = 'admin',
$header_title = 'views.Main.admin.index.header_title', $header_title = 'views.Main.admin.index.header_title',

View File

@ -2,8 +2,8 @@
namespace Chill\MainBundle\Controller; namespace Chill\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Chill\MainBundle\Entity\Center; use Chill\MainBundle\Entity\Center;
@ -11,10 +11,11 @@ use Chill\MainBundle\Form\CenterType;
/** /**
* Center controller. * Class CenterController
* *
* @package Chill\MainBundle\Controller
*/ */
class CenterController extends Controller class CenterController extends AbstractController
{ {
/** /**

View File

@ -2,9 +2,14 @@
namespace Chill\MainBundle\Controller; namespace Chill\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
class DefaultController extends Controller /**
* Class DefaultController
*
* @package Chill\MainBundle\Controller
*/
class DefaultController extends AbstractController
{ {
public function indexAction() public function indexAction()
{ {

View File

@ -22,7 +22,7 @@
namespace Chill\MainBundle\Controller; namespace Chill\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Chill\MainBundle\Form\Type\Export\ExportType; use Chill\MainBundle\Form\Type\Export\ExportType;
use Chill\MainBundle\Form\Type\Export\FormatterType; use Chill\MainBundle\Form\Type\Export\FormatterType;
@ -37,11 +37,12 @@ use Chill\MainBundle\Redis\ChillRedis;
use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Translation\TranslatorInterface;
/** /**
* ExportController is the controller use for exporting data. * Class ExportController
* * Controller used for exporting data.
* *
* @package Chill\MainBundle\Controller
*/ */
class ExportController extends Controller class ExportController extends AbstractController
{ {
/** /**

View File

@ -2,12 +2,17 @@
namespace Chill\MainBundle\Controller; namespace Chill\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils; use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
class LoginController extends Controller /**
* Class LoginController
*
* @package Chill\MainBundle\Controller
*/
class LoginController extends AbstractController
{ {
/** /**
* *

View File

@ -2,9 +2,14 @@
namespace Chill\MainBundle\Controller; namespace Chill\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
class MenuController extends Controller /**
* Class MenuController
*
* @package Chill\MainBundle\Controller
*/
class MenuController extends AbstractController
{ {
public function writeMenuAction($menu, $layout, $activeRouteKey = null, array $args = array() ) public function writeMenuAction($menu, $layout, $activeRouteKey = null, array $args = array() )
{ {

View File

@ -2,7 +2,7 @@
namespace Chill\MainBundle\Controller; namespace Chill\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Chill\MainBundle\Form\UserPasswordType; use Chill\MainBundle\Form\UserPasswordType;
@ -20,7 +20,12 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Chill\MainBundle\Security\PasswordRecover\PasswordRecoverEvent; use Chill\MainBundle\Security\PasswordRecover\PasswordRecoverEvent;
use Chill\MainBundle\Security\PasswordRecover\PasswordRecoverVoter; use Chill\MainBundle\Security\PasswordRecover\PasswordRecoverVoter;
class PasswordController extends Controller /**
* Class PasswordController
*
* @package Chill\MainBundle\Controller
*/
class PasswordController extends AbstractController
{ {
/** /**
* *

View File

@ -4,8 +4,8 @@ namespace Chill\MainBundle\Controller;
use Chill\MainBundle\Security\RoleProvider; use Chill\MainBundle\Security\RoleProvider;
use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\MainBundle\Templating\TranslatableStringHelper;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Chill\MainBundle\Entity\RoleScope; use Chill\MainBundle\Entity\RoleScope;
use Chill\MainBundle\Entity\PermissionsGroup; use Chill\MainBundle\Entity\PermissionsGroup;
@ -17,10 +17,11 @@ use Chill\MainBundle\Form\Type\ComposedRoleScopeType;
use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Contracts\Translation\TranslatorInterface;
/** /**
* PermissionsGroup controller. * Class PermissionsGroupController
* *
* @package Chill\MainBundle\Controller
*/ */
class PermissionsGroupController extends Controller class PermissionsGroupController extends AbstractController
{ {
/** /**
* @var TranslatableStringHelper * @var TranslatableStringHelper

View File

@ -19,7 +19,7 @@
*/ */
namespace Chill\MainBundle\Controller; namespace Chill\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Chill\MainBundle\Entity\PostalCode; use Chill\MainBundle\Entity\PostalCode;
@ -28,11 +28,12 @@ use Chill\MainBundle\Templating\TranslatableStringHelper;
use Doctrine\ORM\Query; use Doctrine\ORM\Query;
/** /**
* * Class PostalCodeController
* *
* @package Chill\MainBundle\Controller
* @author Julien Fastré <julien.fastre@champs-libres.coop> * @author Julien Fastré <julien.fastre@champs-libres.coop>
*/ */
class PostalCodeController extends Controller class PostalCodeController extends AbstractController
{ {
/** /**
* *

View File

@ -2,19 +2,18 @@
namespace Chill\MainBundle\Controller; namespace Chill\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Form\ScopeType; use Chill\MainBundle\Form\ScopeType;
/** /**
* Scope controller. * Class ScopeController
* *
* @package Chill\MainBundle\Controller
*/ */
class ScopeController extends Controller class ScopeController extends AbstractController
{ {
/** /**

View File

@ -22,7 +22,7 @@
namespace Chill\MainBundle\Controller; namespace Chill\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Chill\MainBundle\Search\UnknowSearchDomainException; use Chill\MainBundle\Search\UnknowSearchDomainException;
use Chill\MainBundle\Search\UnknowSearchNameException; use Chill\MainBundle\Search\UnknowSearchNameException;
@ -36,10 +36,11 @@ use Symfony\Contracts\Translation\TranslatorInterface;
use Chill\MainBundle\Pagination\PaginatorFactory; use Chill\MainBundle\Pagination\PaginatorFactory;
/** /**
* Class SearchController
* *
* * @package Chill\MainBundle\Controller
*/ */
class SearchController extends Controller class SearchController extends AbstractController
{ {
/** /**
* *

View File

@ -17,15 +17,16 @@
*/ */
namespace Chill\MainBundle\Controller; namespace Chill\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Chill\MainBundle\Templating\UI\CountNotificationUser; use Chill\MainBundle\Templating\UI\CountNotificationUser;
/** /**
* * Class UIController
* *
* @package Chill\MainBundle\Controller
* @author Julien Fastré <julien.fastre@champs-libres.coop> * @author Julien Fastré <julien.fastre@champs-libres.coop>
*/ */
class UIController extends Controller class UIController extends AbstractController
{ {
public function showNotificationUserCounterAction( public function showNotificationUserCounterAction(
CountNotificationUser $counter CountNotificationUser $counter

View File

@ -2,10 +2,9 @@
namespace Chill\MainBundle\Controller; namespace Chill\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Chill\MainBundle\Entity\User; use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Form\UserType; use Chill\MainBundle\Form\UserType;
use Chill\MainBundle\Entity\GroupCenter; use Chill\MainBundle\Entity\GroupCenter;
@ -14,10 +13,11 @@ use Chill\MainBundle\Form\UserPasswordType;
/** /**
* User controller. * Class UserController
* *
* @package Chill\MainBundle\Controller
*/ */
class UserController extends Controller class UserController extends AbstractController
{ {
const FORM_GROUP_CENTER_COMPOSED = 'composed_groupcenter'; const FORM_GROUP_CENTER_COMPOSED = 'composed_groupcenter';