Created
November 22, 2019 08:13
-
-
Save teiling88/5b05d3571a5e4557bfe945e7c35aa1fd to your computer and use it in GitHub Desktop.
Template Registration Shopware 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare(strict_types=1); | |
namespace SwagEnterprisePricingEngine\Subscriber; | |
use Enlight\Event\SubscriberInterface; | |
class BasicSubscriber implements SubscriberInterface | |
{ | |
/** | |
* {@inheritdoc} | |
*/ | |
public static function getSubscribedEvents(): array | |
{ | |
return [ | |
'Theme_Inheritance_Template_Directories_Collected' => 'onTemplateDirectoriesCollect', | |
]; | |
} | |
public function onTemplateDirectoriesCollect(\Enlight_Event_EventArgs $args) | |
{ | |
$dirs = $args->getReturn(); | |
$dirs[] = __DIR__ . '/../Views'; | |
$args->setReturn($dirs); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment