Document/Subscriber/ArticlePageSubscriber.php
public function setTitleOnPersist(PersistEvent $event)
    {
        $document = $event->getDocument();
        if (!$document instanceof ArticlePageDocument) {
            return;
        }

        $document->setTitle($document->getParent()->getTitle());
    }
public function setTitleOnPersist(PersistEvent $event)
    {
        $document = $event->getDocument();
        if (!$document instanceof ArticlePageDocument) {
            return;
        }

        $document->setTitle($document->getParent()->getTitle());
    }
public function setTitleOnPersist ( PersistEvent $ event ) { $ document = $ event -> getDocument ( ) ; if ( ! $ document instanceof ArticlePageDocument ) { return ; } $ document -> setTitle ( $ document -> getParent ( ) -> getTitle ( ) ) ; }
Set page-title from structure to document.

@param PersistEvent $event
Set page - title from structure to document .