src/Service/ElasticSearchPostTransformListener.php line 28

Open in your IDE?
  1. <?php
  2. namespace App\Service;
  3. use App\Entity\Magazine\Magazine;
  4. use App\Entity\Magazine\MagazinePage;
  5. use HTMLPurifier;
  6. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  7. use FOS\ElasticaBundle\Event\TransformEvent;
  8. use FOS\ElasticaBundle\Event\IndexPopulateEvent;
  9. class ElasticSearchPostTransformListener implements EventSubscriberInterface
  10. {
  11.     /**
  12.      * Constructor.
  13.      *
  14.      */
  15.     public function __construct() {
  16.     }
  17.     // ...
  18.     /**
  19.      * @param IndexPopulateEvent $event
  20.      */
  21.     public function doPostTransform(IndexPopulateEvent $event)
  22.     {
  23.         //$entity = $event->getObject();
  24.         //$document = $event->getIndex();
  25.         /*dump("found");
  26.         dump($document);
  27.         die;*/
  28.     }
  29.     public static function getSubscribedEvents()
  30.     {
  31.         return array(
  32.             IndexPopulateEvent::POST_INDEX_POPULATE => 'doPostTransform',
  33.         );
  34.     }
  35. }