<?php
/**
* Pimcore
*
* This source file is available under following license:
* - Pimcore Commercial License (PCL)
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license http://www.pimcore.org/license PCL
*/
namespace ExtendedDataHubFileExportBundle\EventSubscriber;
use Pimcore\Event\DataObjectEvents;
use Pimcore\Event\Model\ElementEventInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class DataObjectSubscriber implements EventSubscriberInterface
{
const ADAPTER_TYPE = 'fileExport';
public static function getSubscribedEvents()
{
return [
DataObjectEvents::POST_UPDATE => ['doExport', 99],
DataObjectEvents::POST_ADD => ['doExport', 99],
DataObjectEvents::PRE_DELETE => ['preDelete', 99],
];
}
protected static function getHelperClass(\Pimcore\Bundle\DataHubBundle\Configuration $config)
{
return new \Pimcore\Bundle\DataHubFileExportBundle\Helper();
}
public static function doExport(ElementEventInterface $e)
{
return;
}
public static function preDelete(ElementEventInterface $e)
{
$element = $e->getElement();
}
}