26 lines
550 B
PHP
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;
|
|
}
|
|
}
|