src/ChangeSet.php
public function canPublish($member = null)
    {
        if (!$member) {
            $member = Security::getCurrentUser();
        }
        // Check all explicitly added items
        foreach ($this->Changes()->filter(['Added' => ChangeSetItem::EXPLICITLY]) as $change) {
            /** @var ChangeSetItem $change */
            if (!$change->canPublish($member)) {
                return false;
            }
        }

        return true;
    }
public function canPublish($member = null)
    {
        if (!$member) {
            $member = Security::getCurrentUser();
        }
        // Check all explicitly added items
        foreach ($this->Changes()->filter(['Added' => ChangeSetItem::EXPLICITLY]) as $change) {
            /** @var ChangeSetItem $change */
            if (!$change->canPublish($member)) {
                return false;
            }
        }

        return true;
    }
public function canPublish ( $ member = null ) { if ( ! $ member ) { $ member = Security :: getCurrentUser ( ) ; } // Check all explicitly added items foreach ( $ this -> Changes ( ) -> filter ( [ 'Added' => ChangeSetItem :: EXPLICITLY ] ) as $ change ) { /** @var ChangeSetItem $change */ if ( ! $ change -> canPublish ( $ member ) ) { return false ; } } return true ; }
Check if this item is allowed to be published

@param Member $member
@return bool
Check if this item is allowed to be published