Document/Subscriber/ArticlePageSubscriber.php
public function setWorkflowStageOnArticle($event)
    {
        $document = $event->getDocument();
        if (!$document instanceof ArticlePageDocument
            || LocalizationState::GHOST === $this->documentInspector->getLocalizationState($document->getParent())
        ) {
            return;
        }

        $document->getParent()->setWorkflowStage(WorkflowStage::TEST);
        $this->documentManager->persist(
            $document->getParent(),
            $this->documentInspector->getLocale($document),
            $event instanceof PersistEvent ? $event->getOptions() : []
        );
    }
public function setWorkflowStageOnArticle($event)
    {
        $document = $event->getDocument();
        if (!$document instanceof ArticlePageDocument
            || LocalizationState::GHOST === $this->documentInspector->getLocalizationState($document->getParent())
        ) {
            return;
        }

        $document->getParent()->setWorkflowStage(WorkflowStage::TEST);
        $this->documentManager->persist(
            $document->getParent(),
            $this->documentInspector->getLocale($document),
            $event instanceof PersistEvent ? $event->getOptions() : []
        );
    }
public function setWorkflowStageOnArticle ( $ event ) { $ document = $ event -> getDocument ( ) ; if ( ! $ document instanceof ArticlePageDocument || LocalizationState :: GHOST === $ this -> documentInspector -> getLocalizationState ( $ document -> getParent ( ) ) ) { return ; } $ document -> getParent ( ) -> setWorkflowStage ( WorkflowStage :: TEST ) ; $ this -> documentManager -> persist ( $ document -> getParent ( ) , $ this -> documentInspector -> getLocale ( $ document ) , $ event instanceof PersistEvent ? $ event -> getOptions ( ) : [ ] ) ; }
Set workflow-stage to test for article.

@param PersistEvent|RemoveEvent $event
Set workflow - stage to test for article .