Document/Subscriber/ArticleSubscriber.php
public function handleCopy(CopyEvent $event)
    {
        $document = $event->getDocument();
        if (!$document instanceof ArticleDocument) {
            return;
        }

        $uuid = $event->getCopiedNode()->getIdentifier();
        $this->documents[$uuid] = [
            'uuid' => $uuid,
            'locale' => $document->getLocale(),
        ];
    }
public function handleCopy(CopyEvent $event)
    {
        $document = $event->getDocument();
        if (!$document instanceof ArticleDocument) {
            return;
        }

        $uuid = $event->getCopiedNode()->getIdentifier();
        $this->documents[$uuid] = [
            'uuid' => $uuid,
            'locale' => $document->getLocale(),
        ];
    }
public function handleCopy ( CopyEvent $ event ) { $ document = $ event -> getDocument ( ) ; if ( ! $ document instanceof ArticleDocument ) { return ; } $ uuid = $ event -> getCopiedNode ( ) -> getIdentifier ( ) ; $ this -> documents [ $ uuid ] = [ 'uuid' => $ uuid , 'locale' => $ document -> getLocale ( ) , ] ; }
Schedule document to index.

@param CopyEvent $event
Schedule document to index .