Adds a public "درباره ما" page at /درباره-ما reusing the landing theme
(same webpack entry, header, footer, registration modal). Section ids
match the header anchors so the nav works on this page too.
The explicit route takes precedence over LandingController's catch-all
/{slug}, which is registered with priority -10.
Also links it from the header nav and footer quick links, and lists it
in sitemap.xml.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
30 lines
970 B
PHP
30 lines
970 B
PHP
<?php
|
|
|
|
namespace App\Shared\Controller;
|
|
|
|
use App\Shared\Captcha\AltchaService;
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
use Symfony\Component\Routing\Attribute\Route;
|
|
|
|
/**
|
|
* صفحهٔ «دربارهٔ ما».
|
|
*
|
|
* اسلاگ فارسی است تا با بقیهٔ صفحات عمومی یکدست باشد. روت صریح تعریف شده و
|
|
* بنابراین بر `/{slug}` صفحات فرود — که با priority منفی ثبت شده — مقدم است.
|
|
*/
|
|
final class AboutController extends AbstractController
|
|
{
|
|
public const SLUG = 'درباره-ما';
|
|
|
|
public function __construct(private readonly AltchaService $altcha) {}
|
|
|
|
#[Route('/' . self::SLUG, name: 'about', methods: ['GET'])]
|
|
public function index(): Response
|
|
{
|
|
return $this->render('public/about.html.twig', [
|
|
'altcha_enabled' => $this->altcha->enabled(),
|
|
]);
|
|
}
|
|
}
|