<?php declare(strict_types=1);
namespace Plugin\my_plugin_id;
use JTL\Events\Dispatcher;
use JTL\Plugin\Bootstrapper;
use JTL\Smarty\JTLSmarty;
class Bootstrap extends Bootstrapper
{
public function boot(Dispatcher $dispatcher)
{
parent::boot($dispatcher);
$dispatcher->listen('shop.hook.' . \HOOK_SMARTY_INC, function (array $args) {
/** @var JTLSmarty $smarty */
$smarty = $args['smarty'];
$smarty->assign('myCustomVariable', $this->getPlugin()->getConfig()->getValue('myCustomOption'));
});
}
}