bundles/ExtendedDataHubFileExportBundle/EventSubscriber/DataObjectSubscriber.php line 37

Open in your IDE?
  1. <?php
  2. /**
  3.  * Pimcore
  4.  *
  5.  * This source file is available under following license:
  6.  * - Pimcore Commercial License (PCL)
  7.  *
  8.  *  @copyright  Copyright (c) Pimcore GmbH (http://www.pimcore.org)
  9.  *  @license    http://www.pimcore.org/license     PCL
  10.  */
  11. namespace ExtendedDataHubFileExportBundle\EventSubscriber;
  12. use Pimcore\Event\DataObjectEvents;
  13. use Pimcore\Event\Model\ElementEventInterface;
  14. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  15. class DataObjectSubscriber implements EventSubscriberInterface
  16. {
  17.     const ADAPTER_TYPE 'fileExport';
  18.     public static function getSubscribedEvents()
  19.     {
  20.         return [
  21.             DataObjectEvents::POST_UPDATE => ['doExport'99],
  22.             DataObjectEvents::POST_ADD => ['doExport'99],
  23.             DataObjectEvents::PRE_DELETE => ['preDelete'99],
  24.         ];
  25.     }
  26.     protected static function getHelperClass(\Pimcore\Bundle\DataHubBundle\Configuration $config)
  27.     {
  28.         return new \Pimcore\Bundle\DataHubFileExportBundle\Helper();
  29.     }
  30.     public static function doExport(ElementEventInterface $e)
  31.     {
  32.         return;
  33.     }
  34.     public static function preDelete(ElementEventInterface $e)
  35.     {
  36.         $element $e->getElement();
  37.     }
  38. }