custom/plugins/GbmedClientPentagastForms/src/GbmedClientPentagastForms.php line 27

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. /**
  3.  * gb media
  4.  * All Rights Reserved.
  5.  *
  6.  * Unauthorized copying of this file, via any medium is strictly prohibited.
  7.  * The content of this file is proprietary and confidential.
  8.  *
  9.  * @category       Shopware
  10.  * @package        Shopware_Plugins
  11.  * @subpackage     GbmedClientPentagastForms
  12.  * @copyright      Copyright (c) 2023, gb media
  13.  * @license        proprietary
  14.  * @author         Giuseppe Bottino
  15.  * @link           http://www.gb-media.biz
  16.  */
  17. namespace Gbmed\ClientPentagastForms;
  18. use Gbmed\ClientPentagastForms\Installer\Handlers\MailInstaller;
  19. use Gbmed\ClientPentagastForms\Installer\Installer;
  20. use Shopware\Core\Framework\Plugin;
  21. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  22. use Shopware\Core\Framework\Plugin\Context\UpdateContext;
  23. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  24. class GbmedClientPentagastForms extends Plugin
  25. {
  26.     public function install(InstallContext $context): void
  27.     {
  28.         $this->getInstaller()->install($context);
  29.     }
  30.     public function update(UpdateContext $context): void
  31.     {
  32.         $this->getInstaller()->update($context);
  33.     }
  34.     public function uninstall(UninstallContext $context): void
  35.     {
  36.         $this->getInstaller()->uninstall($context);
  37.     }
  38.     private function getInstaller(): Installer
  39.     {
  40.         return new Installer(
  41.             $this->container->get('mail_template_type.repository'),
  42.             $this->container->get('mail_template.repository')
  43.         );
  44.     }
  45. }