public function deleteContentfulEntry(DeletedEntry $remoteEntry): void
    {
        /** @var \Contentful\Delivery\SystemProperties $systemProperties */
        $systemProperties = $remoteEntry->getSystemProperties();

        $space = $systemProperties->getSpace();
        if ($space === null) {
            return;
        }

        $id = $space->getId() . '|' . $remoteEntry->getId();

        $contentfulEntry = $this->findContentfulEntry($id);
        if ($contentfulEntry instanceof ContentfulEntry) {
            $contentfulEntry->setIsDeleted(true);
            $this->entityManager->persist($contentfulEntry);

            foreach ($contentfulEntry->getRoutes() as $route) {
                $this->entityManager->remove($route);
            }

            $this->entityManager->flush();
        }
    }
public function deleteContentfulEntry(DeletedEntry $remoteEntry): void
    {
        /** @var \Contentful\Delivery\SystemProperties $systemProperties */
        $systemProperties = $remoteEntry->getSystemProperties();

        $space = $systemProperties->getSpace();
        if ($space === null) {
            return;
        }

        $id = $space->getId() . '|' . $remoteEntry->getId();

        $contentfulEntry = $this->findContentfulEntry($id);
        if ($contentfulEntry instanceof ContentfulEntry) {
            $contentfulEntry->setIsDeleted(true);
            $this->entityManager->persist($contentfulEntry);

            foreach ($contentfulEntry->getRoutes() as $route) {
                $this->entityManager->remove($route);
            }

            $this->entityManager->flush();
        }
    }
public function deleteContentfulEntry ( DeletedEntry $ remoteEntry ) : void { /** @var \Contentful\Delivery\SystemProperties $systemProperties */ $ systemProperties = $ remoteEntry -> getSystemProperties ( ) ; $ space = $ systemProperties -> getSpace ( ) ; if ( $ space === null ) { return ; } $ id = $ space -> getId ( ) . '|' . $ remoteEntry -> getId ( ) ; $ contentfulEntry = $ this -> findContentfulEntry ( $ id ) ; if ( $ contentfulEntry instanceof ContentfulEntry ) { $ contentfulEntry -> setIsDeleted ( true ) ; $ this -> entityManager -> persist ( $ contentfulEntry ) ; foreach ( $ contentfulEntry -> getRoutes ( ) as $ route ) { $ this -> entityManager -> remove ( $ route ) ; } $ this -> entityManager -> flush ( ) ; } }
Deletes the Contentful entry for provided remote entry.
Deletes the Contentful entry for provided remote entry .