public function delete(GenericEvent $event)
    {
        $eventCaller = $event->getSubject();
        $arguments = $event->getArguments();

        if ($eventCaller instanceof \Article) {
            $entry = $this->em
                ->getRepository('Newscoop\IngestPluginBundle\Entity\Feed\Entry')
                ->findOneByArticleId($eventCaller->getArticleNumber());
            if ($entry !== null) {
                $entry->setArticleId(NULL);
                $entry->setPublished(NULL);
                $this->em->persist($entry);
                $this->em->flush();
            }
        }
    }
public function delete(GenericEvent $event)
    {
        $eventCaller = $event->getSubject();
        $arguments = $event->getArguments();

        if ($eventCaller instanceof \Article) {
            $entry = $this->em
                ->getRepository('Newscoop\IngestPluginBundle\Entity\Feed\Entry')
                ->findOneByArticleId($eventCaller->getArticleNumber());
            if ($entry !== null) {
                $entry->setArticleId(NULL);
                $entry->setPublished(NULL);
                $this->em->persist($entry);
                $this->em->flush();
            }
        }
    }
public function delete ( GenericEvent $ event ) { $ eventCaller = $ event -> getSubject ( ) ; $ arguments = $ event -> getArguments ( ) ; if ( $ eventCaller instanceof \ Article ) { $ entry = $ this -> em -> getRepository ( 'Newscoop\IngestPluginBundle\Entity\Feed\Entry' ) -> findOneByArticleId ( $ eventCaller -> getArticleNumber ( ) ) ; if ( $ entry !== null ) { $ entry -> setArticleId ( NULL ) ; $ entry -> setPublished ( NULL ) ; $ this -> em -> persist ( $ entry ) ; $ this -> em -> flush ( ) ; } } }
Handles delete event for articles. Unlink article from entry and
unpublishes entry.

@param  Newscoop\EventDispatcher\Events\GenericEvent $event
Handles delete event for articles . Unlink article from entry and unpublishes entry .