THELIA Forum

Welcome to the THELIA support and discusssion forum

Announcement

Rejoignez la communauté sur le Discord Thelia : https://discord.gg/YgwpYEE3y3

Offline


Bonjour,

Je suis dans un Hook avec un HookRenderBlockEvent et j'aurais besoin de générer une url à partir d'une route. Comment puis-je faire?

public function onAdminInTopMenuTools(HookRenderBlockEvent $event)
    {
        $event->add([
            "id" => "test",
            "class" => "test",
            "url" => "",
            "title" => "test"
        ]);
    }

En passant par un HookRenderEvent, je peux faire tout simplement dans le template

{url path='/admin/module/Subscription'}

Mais dans ma classe HookManager je ne sais pas vraiment comment procéder.

Par avance merci pour votre aide

Last edited by wisejack (21-04-2017 21:57:07)

Offline


Ah c'est bon j'ai trouvé, Merci

URL::getInstance()->absoluteUrl('/admin/module/Tags'),