|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
/* |
|
6
|
|
|
* This file is part of the Zikula package. |
|
7
|
|
|
* |
|
8
|
|
|
* Copyright Zikula - https://ziku.la/ |
|
9
|
|
|
* |
|
10
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
11
|
|
|
* file that was distributed with this source code. |
|
12
|
|
|
*/ |
|
13
|
|
|
|
|
14
|
|
|
namespace Zikula\ThemeBundle\Controller; |
|
15
|
|
|
|
|
16
|
|
|
use Psr\Log\LoggerInterface; |
|
17
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; |
|
18
|
|
|
use Symfony\Component\DependencyInjection\Attribute\Autowire; |
|
19
|
|
|
use Symfony\Component\HttpFoundation\Request; |
|
20
|
|
|
use Symfony\Component\HttpFoundation\Response; |
|
21
|
|
|
use Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException; |
|
22
|
|
|
use Symfony\Component\Mailer\Exception\TransportExceptionInterface; |
|
23
|
|
|
use Symfony\Component\Mailer\MailerInterface; |
|
24
|
|
|
use Symfony\Component\Mime\Address; |
|
25
|
|
|
use Symfony\Component\Mime\Email; |
|
26
|
|
|
use Symfony\Component\RateLimiter\RateLimiterFactory; |
|
27
|
|
|
use Symfony\Component\Routing\Annotation\Route; |
|
28
|
|
|
use Symfony\Component\Security\Http\Attribute\IsGranted; |
|
29
|
|
|
use Zikula\CoreBundle\Site\SiteDefinitionInterface; |
|
30
|
|
|
use Zikula\ThemeBundle\Form\Type\MailTestType; |
|
31
|
|
|
use Zikula\ThemeBundle\Helper\FallbackDashboardDetector; |
|
32
|
|
|
|
|
33
|
|
|
class TestController extends AbstractController |
|
34
|
|
|
{ |
|
35
|
|
|
#[Route('/test/page', name: 'zikulathemebundle_test_page')] |
|
36
|
|
|
#[Route('/admin/test/page', name: 'zikulathemebundle_admin_test_page')] |
|
37
|
|
|
public function lala(Request $request, FallbackDashboardDetector $dashboardDetector): Response |
|
38
|
|
|
{ |
|
39
|
|
|
return $this->render('@ZikulaTheme/Test/page.html.twig', |
|
40
|
|
|
[ |
|
41
|
|
|
'isAdminArea' => $request->attributes->get('isAdminArea', false), |
|
42
|
|
|
] |
|
43
|
|
|
); |
|
44
|
|
|
} |
|
45
|
|
|
} |
|
46
|
|
|
|