private function setTransitionStatus(Entity\Content $content, $contentTypeSlug, $id, $oldStatus)
    {
        $canTransition = $this->users->isContentStatusTransitionAllowed($oldStatus, $content->getStatus(), $contentTypeSlug, $id);
        if (!$canTransition) {
            $content->setStatus($oldStatus);
        }
    }
private function setTransitionStatus(Entity\Content $content, $contentTypeSlug, $id, $oldStatus)
    {
        $canTransition = $this->users->isContentStatusTransitionAllowed($oldStatus, $content->getStatus(), $contentTypeSlug, $id);
        if (!$canTransition) {
            $content->setStatus($oldStatus);
        }
    }
private function setTransitionStatus ( Entity \ Content $ content , $ contentTypeSlug , $ id , $ oldStatus ) { $ canTransition = $ this -> users -> isContentStatusTransitionAllowed ( $ oldStatus , $ content -> getStatus ( ) , $ contentTypeSlug , $ id ) ; if ( ! $ canTransition ) { $ content -> setStatus ( $ oldStatus ) ; } }
Check whether the status is allowed.

We act as if a status *transition* were requested and fallback to the old
status otherwise.

@param Entity\Content $content
@param string         $contentTypeSlug
@param int            $id
@param string         $oldStatus
Check whether the status is allowed .