custom/plugins/MwTinyMce/src/Subscriber/MwSubscriber.php line 26

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Mw\TinyMce\Subscriber;
  3. use Shopware\Core\Framework\DataAbstractionLayer\Event\EntityLoadedEvent;
  4. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  5. use Shopware\Core\Content\Product\ProductEvents;
  6. use Shopware\Core\System\SystemConfig\SystemConfigService;
  7. class MwSubscriber implements EventSubscriberInterface
  8. {
  9.     private SystemConfigService $systemConfigService;
  10.     public function __construct(SystemConfigService $systemConfigService)
  11.     {
  12.         $this->systemConfigService $systemConfigService;
  13.     }
  14.     public static function getSubscribedEvents(): array
  15.     {
  16.         return [
  17.             ProductEvents::PRODUCT_LOADED_EVENT => 'onProductsLoaded'
  18.         ];
  19.     }
  20.     public function onProductsLoaded(EntityLoadedEvent $event): void
  21.     {
  22.         $templatesConfig $this->systemConfigService->get('MwTinyMce.config.templates');
  23.     }
  24. }