src/NodeRepository.php
protected function withPublishedOnly($published)
    {
        if ($published === false)
        {
            return false;
        }

        if ($this->tokenManager->requestHasToken('preview_nodes'))
        {
            return false;
        }

        return true;
    }
protected function withPublishedOnly($published)
    {
        if ($published === false)
        {
            return false;
        }

        if ($this->tokenManager->requestHasToken('preview_nodes'))
        {
            return false;
        }

        return true;
    }
protected function withPublishedOnly ( $ published ) { if ( $ published === false ) { return false ; } if ( $ this -> tokenManager -> requestHasToken ( 'preview_nodes' ) ) { return false ; } return true ; }
Checks if the request includes unpublished nodes as well

@param bool $published
@return bool
Checks if the request includes unpublished nodes as well