custom/plugins/NimbitsArticlePDFsNext/src/NimbitsArticlePDFsNext.php line 22

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Nimbits\NimbitsArticlePDFsNext;
  3. use Shopware\Core\Framework\Plugin;
  4. use Shopware\Core\Framework\Context;
  5. use Shopware\Core\Framework\Plugin\Context\ActivateContext;
  6. use Shopware\Core\Framework\Plugin\Context\DeactivateContext;
  7. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  8. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  9. use Shopware\Core\Framework\CustomField\CustomFieldTypes;
  10. use Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface;
  11. use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
  12. use Shopware\Core\Framework\DataAbstractionLayer\Search\Filter\EqualsFilter;
  13. use Shopware\Core\Framework\DataAbstractionLayer\Search\IdSearchResult;
  14. use Shopware\Core\System\SystemConfig\SystemConfigDefinition;
  15. use Doctrine\DBAL\Connection;
  16. use Shopware\Core\Framework\Uuid\Uuid;
  17. use Shopware\Core\Defaults;
  18. use Nimbits\NimbitsArticlePDFsNext\Schema\SchemaUpgrade;
  19. class NimbitsArticlePDFsNext extends Plugin
  20. {
  21.     
  22.     public function getServicesFilePath(): string
  23.     {
  24.         return 'Resources/service/services.xml';
  25.     }
  26.     
  27.     public function getViewPaths(): array
  28.     {
  29.         $viewPaths parent::getViewPaths();
  30.         $viewPaths[] = 'Resources/views/storefront';
  31.         return $viewPaths;
  32.     }
  33.     
  34.     public function activate(ActivateContext $context): void
  35.     {
  36.         parent::activate($context);
  37.         
  38.         SchemaUpgrade::activate($context$this->container);
  39.     }
  40.     
  41.     public function deactivate(DeactivateContext $context): void
  42.     {
  43.         parent::deactivate($context);
  44.         
  45.         SchemaUpgrade::deactivate($context$this->container);
  46.     }
  47.     
  48.     public function install(InstallContext $context): void
  49.     {
  50.         parent::install($context);
  51.         
  52.         SchemaUpgrade::install($context$this->container);
  53.     }
  54.     
  55.     public function uninstall(UninstallContext $context): void
  56.     {
  57.         parent::uninstall($context);
  58.         SchemaUpgrade::uninstall($context$this->container);
  59.     }
  60.     
  61. }