setStringCompiler example

$container->get(Enlight_Template_Manager::class)
        );
        $mailer = new Shopware_Components_TemplateMail();
        if ($container->initialized('shop')) {
            $shop = $container->get('shop');
            if (!$shop instanceof Shop) {
                throw new RuntimeException('Shop object not found in DI container');
            }
            $mailer->setShop($shop);
        }
        $mailer->setModelManager($container->get(ModelManager::class));
        $mailer->setStringCompiler($stringCompiler);

        return $mailer;
    }
}
Home | Imprint | This part of the site doesn't use cookies.