Files
kupshop/bundles/KupShop/KupShopBundle/Routing/AdminRoute.php
2025-08-02 16:30:27 +02:00

26 lines
550 B
PHP

<?php
namespace KupShop\KupShopBundle\Routing;
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
use KupShop\KupShopBundle\Config;
use Symfony\Component\Routing\Annotation\Route;
/**
* @Annotation
* @NamedArgumentConstructor
* @Target({"CLASS", "METHOD"})
*/
#[\Attribute] class AdminRoute extends Route
{
public function getPath()
{
$cfg = Config::get();
$path = parent::getPath();
$adminPath = trim($cfg['Menu']['wpj_toolbar']['admin_url'], '/');
return $adminPath.$path;
}
}