custom/plugins/CrayssnLabsDpdConnector/src/CrayssnLabsDpdConnector.php line 21

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace CrayssnLabsDpdConnector;
  4. use Shopware\Core\Framework\Plugin;
  5. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  6. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  7. use CrayssnLabsDpdConnector\Framework\Lifecycle;
  8. use Shopware\Core\Framework\Plugin\Context\UpdateContext;
  9. /**
  10.  * Class CrayssnLabsDpdConnector
  11.  *
  12.  * @package   CrayssnLabsDpdConnector
  13.  *
  14.  * @author    Sebastian Ludwig <dev@cl.team>
  15.  * @copyright Copyright (c) 2022, CrayssnLabs Ludwig Wiegler GbR
  16.  */
  17. class CrayssnLabsDpdConnector extends Plugin
  18. {
  19.     const
  20.         MAIL_RETOUR_TEMPLATE_TYPE_TECHNICAL_NAME 'CrayssnLabsDpdConnector.mail.retour',
  21.         MAIL_TRACKING_TEMPLATE_TYPE_TECHNICAL_NAME 'CrayssnLabsDpdConnector.mail.tracking';
  22.     /**
  23.      * Function install
  24.      *
  25.      * @param \Shopware\Core\Framework\Plugin\Context\InstallContext $installContext
  26.      */
  27.     public function install(InstallContext $installContext): void
  28.     {
  29.         (new Lifecycle\Install($this->container$installContext->getContext()))->run();
  30.         parent::install($installContext);
  31.     }
  32.     /**
  33.      * Function uninstall
  34.      *
  35.      * @param \Shopware\Core\Framework\Plugin\Context\UninstallContext $uninstallContext
  36.      */
  37.     public function uninstall(UninstallContext $uninstallContext): void
  38.     {
  39.         (new Lifecycle\Uninstall($this->container$uninstallContext->getContext()))->run();
  40.         parent::uninstall($uninstallContext);
  41.     }
  42.     /**
  43.      * Function update
  44.      *
  45.      * @param \Shopware\Core\Framework\Plugin\Context\UpdateContext $updateContext
  46.      *
  47.      * @throws \Doctrine\DBAL\Exception
  48.      */
  49.     public function update(UpdateContext $updateContext): void
  50.     {
  51.         (new Lifecycle\Update($this->container$updateContext->getContext()))->run();
  52.         parent::update($updateContext);
  53.     }
  54. }