public function canPublish()
    {
        // Override any default behaviour, to allow queuedjobs to complete
        if ($this->isPublishJobRunning()) {
            return true;
        }

        if ($active = $this->getWorkflowInstance()) {
            $publish = $active->canPublishTarget($this->owner);
            if (!is_null($publish)) {
                return $publish;
            }
        }

        // use definition to determine if publishing directly is allowed
        $definition = $this->getWorkflowService()->getDefinitionFor($this->owner);

        if ($definition) {
            if (!Security::getCurrentUser()) {
                return false;
            }
            $member = Security::getCurrentUser();

            $canPublish = $definition->canWorkflowPublish($member, $this->owner);

            return $canPublish;
        }
    }
public function canPublish()
    {
        // Override any default behaviour, to allow queuedjobs to complete
        if ($this->isPublishJobRunning()) {
            return true;
        }

        if ($active = $this->getWorkflowInstance()) {
            $publish = $active->canPublishTarget($this->owner);
            if (!is_null($publish)) {
                return $publish;
            }
        }

        // use definition to determine if publishing directly is allowed
        $definition = $this->getWorkflowService()->getDefinitionFor($this->owner);

        if ($definition) {
            if (!Security::getCurrentUser()) {
                return false;
            }
            $member = Security::getCurrentUser();

            $canPublish = $definition->canWorkflowPublish($member, $this->owner);

            return $canPublish;
        }
    }
public function canPublish ( ) { // Override any default behaviour, to allow queuedjobs to complete if ( $ this -> isPublishJobRunning ( ) ) { return true ; } if ( $ active = $ this -> getWorkflowInstance ( ) ) { $ publish = $ active -> canPublishTarget ( $ this -> owner ) ; if ( ! is_null ( $ publish ) ) { return $ publish ; } } // use definition to determine if publishing directly is allowed $ definition = $ this -> getWorkflowService ( ) -> getDefinitionFor ( $ this -> owner ) ; if ( $ definition ) { if ( ! Security :: getCurrentUser ( ) ) { return false ; } $ member = Security :: getCurrentUser ( ) ; $ canPublish = $ definition -> canWorkflowPublish ( $ member , $ this -> owner ) ; return $ canPublish ; } }
Content can never be directly publishable if there's a workflow applied.

If there's an active instance, then it 'might' be publishable
Content can never be directly publishable if there s a workflow applied .