Routing/ArticleRouteDefaultProvider.php
public function isPublished($entityClass, $id, $locale)
    {
        $object = $this->documentManager->find($id, $locale);

        if (!$object instanceof ArticleInterface || WorkflowStage::PUBLISHED !== $object->getWorkflowStage()) {
            return false;
        }

        if (!$object instanceof WebspaceBehavior) {
            return true;
        }

        $webspace = $this->requestAnalyzer->getWebspace();
        if (!$webspace ||
            (
                $this->webspaceResolver->resolveMainWebspace($object) !== $webspace->getKey()
                && !in_array($webspace->getKey(), $this->webspaceResolver->resolveAdditionalWebspaces($object))
            )
        ) {
            return false;
        }

        return true;
    }
public function isPublished($entityClass, $id, $locale)
    {
        $object = $this->documentManager->find($id, $locale);

        if (!$object instanceof ArticleInterface || WorkflowStage::PUBLISHED !== $object->getWorkflowStage()) {
            return false;
        }

        if (!$object instanceof WebspaceBehavior) {
            return true;
        }

        $webspace = $this->requestAnalyzer->getWebspace();
        if (!$webspace ||
            (
                $this->webspaceResolver->resolveMainWebspace($object) !== $webspace->getKey()
                && !in_array($webspace->getKey(), $this->webspaceResolver->resolveAdditionalWebspaces($object))
            )
        ) {
            return false;
        }

        return true;
    }
public function isPublished ( $ entityClass , $ id , $ locale ) { $ object = $ this -> documentManager -> find ( $ id , $ locale ) ; if ( ! $ object instanceof ArticleInterface || WorkflowStage :: PUBLISHED !== $ object -> getWorkflowStage ( ) ) { return false ; } if ( ! $ object instanceof WebspaceBehavior ) { return true ; } $ webspace = $ this -> requestAnalyzer -> getWebspace ( ) ; if ( ! $ webspace || ( $ this -> webspaceResolver -> resolveMainWebspace ( $ object ) !== $ webspace -> getKey ( ) && ! in_array ( $ webspace -> getKey ( ) , $ this -> webspaceResolver -> resolveAdditionalWebspaces ( $ object ) ) ) ) { return false ; } return true ; }
If article is not published the document will be of typ unknown-document.
Also check the workflow stage if it`s a ArticleDocument.

{@inheritdoc}
If article is not published the document will be of typ unknown - document . Also check the workflow stage if it s a ArticleDocument .