vendor/dpfaffenbauer/process-manager/src/ProcessManagerBundle/ProcessManagerBundle.php line 28

Open in your IDE?
  1. <?php
  2. /**
  3.  * Process Manager.
  4.  *
  5.  * LICENSE
  6.  *
  7.  * This source file is subject to the GNU General Public License version 3 (GPLv3)
  8.  * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
  9.  * files that are distributed with this source code.
  10.  *
  11.  * @copyright  Copyright (c) 2015-2020 Dominik Pfaffenbauer (https://www.pfaffenbauer.at)
  12.  * @license    https://github.com/dpfaffenbauer/ProcessManager/blob/master/gpl-3.0.txt GNU General Public License version 3 (GPLv3)
  13.  */
  14. namespace ProcessManagerBundle;
  15. use Composer\InstalledVersions;
  16. use CoreShop\Bundle\ResourceBundle\AbstractResourceBundle;
  17. use CoreShop\Bundle\ResourceBundle\CoreShopResourceBundle;
  18. use Pimcore\Extension\Bundle\PimcoreBundleInterface;
  19. use ProcessManagerBundle\DependencyInjection\Compiler\MonologHandlerPass;
  20. use ProcessManagerBundle\DependencyInjection\Compiler\ProcessHandlerFactoryTypeRegistryCompilerPass;
  21. use ProcessManagerBundle\DependencyInjection\Compiler\ProcessReportTypeRegistryCompilerPass;
  22. use ProcessManagerBundle\DependencyInjection\Compiler\ProcessStartupFormRegistryCompilerPass;
  23. use ProcessManagerBundle\DependencyInjection\Compiler\ProcessTypeRegistryCompilerPass;
  24. use Symfony\Component\DependencyInjection\ContainerBuilder;
  25. class ProcessManagerBundle extends AbstractResourceBundle implements PimcoreBundleInterface
  26. {
  27.     public const STATUS_RUNNING 'running';
  28.     public const STATUS_STOPPED 'stopped';
  29.     public const STATUS_STOPPING 'stopping';
  30.     public const STATUS_COMPLETED 'completed';
  31.     public const STATUS_COMPLETED_WITH_EXCEPTIONS 'completed_with_exceptions';
  32.     public const STATUS_FAILED 'failed';
  33.     public function getSupportedDrivers(): array
  34.     {
  35.         return [
  36.             CoreShopResourceBundle::DRIVER_PIMCORE,
  37.         ];
  38.     }
  39.     public function build(ContainerBuilder $builder): void
  40.     {
  41.         parent::build($builder);
  42.         $builder->addCompilerPass(new ProcessTypeRegistryCompilerPass());
  43.         $builder->addCompilerPass(new ProcessReportTypeRegistryCompilerPass());
  44.         $builder->addCompilerPass(new ProcessHandlerFactoryTypeRegistryCompilerPass());
  45.         $builder->addCompilerPass(new MonologHandlerPass());
  46.         $builder->addCompilerPass(new ProcessStartupFormRegistryCompilerPass());
  47.     }
  48.     public function getVersion(): string
  49.     {
  50.         if (InstalledVersions::isInstalled('dpfaffenbauer/process-manager')) {
  51.             return InstalledVersions::getVersion('dpfaffenbauer/process-manager');
  52.         }
  53.         return '';
  54.     }
  55.     public function getNiceName(): string
  56.     {
  57.         return 'Process Manager';
  58.     }
  59.     public function getDescription(): string
  60.     {
  61.         return 'Process Manager helps you to see statuses for long running Processes';
  62.     }
  63.     public function getInstaller(): Installer
  64.     {
  65.         return $this->container->get(Installer::class);
  66.     }
  67.     public function getAdminIframePath(): ?string
  68.     {
  69.         return null;
  70.     }
  71.     public function getJsPaths(): array
  72.     {
  73.         return [];
  74.     }
  75.     public function getCssPaths(): array
  76.     {
  77.         return [];
  78.     }
  79.     public function getEditmodeJsPaths(): array
  80.     {
  81.         return [];
  82.     }
  83.     public function getEditmodeCssPaths(): array
  84.     {
  85.         return [];
  86.     }
  87. }