-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOssBackendGrid.php
More file actions
executable file
·39 lines (35 loc) · 1.1 KB
/
OssBackendGrid.php
File metadata and controls
executable file
·39 lines (35 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
namespace OssBackendGrid;
use Shopware\Components\Plugin;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* Shopware-Plugin OssBackendGrid.
*/
class OssBackendGrid extends Plugin
{
public static function getSubscribedEvents()
{
return array(
'Enlight_Controller_Dispatcher_ControllerPath_Backend_OssBackendGrid' => 'onGetOssBackendGrid',
);
}
/**
* @param ContainerBuilder $container
*/
public function build(ContainerBuilder $container)
{
$container->setParameter('oss_backend_grid.plugin_dir', $this->getPath());
parent::build($container);
}
/**
* Register the backend controller
*
* @param \Enlight_Event_EventArgs $args
* @return string
* @Enlight\Event Enlight_Controller_Dispatcher_ControllerPath_Backend_OssBackendGrid */
public function onGetOssBackendGrid(\Enlight_Event_EventArgs $args)
{
$this->container->get('template')->addTemplateDir($this->getPath() . '/Resources/views/');
return __DIR__ . '/Controllers/Backend/OssBackendGrid.php';
}
}