forked from contao/contao
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set login constants in request listener (see contao#4968)
Description ----------- - Commits ------- 829a207 set login constants in request listener cc98d05 update tests 6975586 only set constants if framework was initialized 3a5bb25 code style df1a2b5 expect deprecation 7abe0f2 English please 7d72d58 simplify implementation 98a490d use getMode d60c2cb Merge remote-tracking branch 'origin/4.9' into set-login-constants-in…
- Loading branch information
Showing
4 changed files
with
141 additions
and
25 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
core-bundle/src/EventListener/LegacyLoginConstantsListener.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of Contao. | ||
* | ||
* (c) Leo Feyer | ||
* | ||
* @license LGPL-3.0-or-later | ||
*/ | ||
|
||
namespace Contao\CoreBundle\EventListener; | ||
|
||
use Contao\CoreBundle\Framework\ContaoFramework; | ||
use Symfony\Component\HttpKernel\Event\RequestEvent; | ||
|
||
/** | ||
* @internal | ||
* | ||
* @deprecated Deprecated since Contao 4.9, to be removed in Contao 5.0 | ||
*/ | ||
class LegacyLoginConstantsListener | ||
{ | ||
/** | ||
* @var ContaoFramework | ||
*/ | ||
private $framework; | ||
|
||
public function __construct(ContaoFramework $framework) | ||
{ | ||
$this->framework = $framework; | ||
} | ||
|
||
public function __invoke(RequestEvent $event): void | ||
{ | ||
$this->framework->setLoginConstants(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters