<?php
namespace App\Service;
use App\Entity\Magazine\Magazine;
use App\Entity\Magazine\MagazinePage;
use HTMLPurifier;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use FOS\ElasticaBundle\Event\TransformEvent;
use FOS\ElasticaBundle\Event\IndexPopulateEvent;
class ElasticSearchPostTransformListener implements EventSubscriberInterface
{
/**
* Constructor.
*
*/
public function __construct() {
}
// ...
/**
* @param IndexPopulateEvent $event
*/
public function doPostTransform(IndexPopulateEvent $event)
{
//$entity = $event->getObject();
//$document = $event->getIndex();
/*dump("found");
dump($document);
die;*/
}
public static function getSubscribedEvents()
{
return array(
IndexPopulateEvent::POST_INDEX_POPULATE => 'doPostTransform',
);
}
}