Initial Commit
This commit is contained in:
63
local/modules/Slide/Hook/BackHook.php
Normal file
63
local/modules/Slide/Hook/BackHook.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
|
||||
namespace Slide\Hook;
|
||||
|
||||
use Slide\Slide;
|
||||
use Thelia\Core\Event\Hook\HookRenderBlockEvent;
|
||||
use Thelia\Core\Event\Hook\HookRenderEvent;
|
||||
use Thelia\Core\Hook\BaseHook;
|
||||
use Thelia\Tools\URL;
|
||||
|
||||
/**
|
||||
* Class BackHook
|
||||
* @package Slide\Hook
|
||||
* @author Julien Chanséaume <jchanseaume@openstudio.fr>
|
||||
*/
|
||||
class BackHook extends BaseHook
|
||||
{
|
||||
public function onMainTopMenuTools(HookRenderBlockEvent $event)
|
||||
{
|
||||
$event->add(
|
||||
[
|
||||
'id' => 'tools_menu_slide',
|
||||
'class' => '',
|
||||
'url' => URL::getInstance()->absoluteUrl('/admin/module/slides'),
|
||||
'title' => $this->trans('Slides', [], Slide::getModuleCode())
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function onTabContent(HookRenderEvent $event)
|
||||
{
|
||||
$event->add(
|
||||
$this->render(
|
||||
'tab-content.html',
|
||||
[
|
||||
'ref' => $event->getArgument('view'),
|
||||
'ref_id' => $event->getArgument('id')
|
||||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public function onTabContentJs(HookRenderEvent $event)
|
||||
{
|
||||
$event->add(
|
||||
$this->render(
|
||||
'tab-content-js.html'
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user