src/Versioned.php
public function isPublished()
    {
        $id = $this->owner->ID ?: $this->owner->OldID;
        if (!$id) {
            return false;
        }

        // Non-staged objects are considered "published" if saved
        if (!$this->hasStages()) {
            return true;
        }

        $liveVersion = static::get_versionnumber_by_stage($this->owner, Versioned::LIVE, $id);
        return (bool)$liveVersion;
    }
public function isPublished()
    {
        $id = $this->owner->ID ?: $this->owner->OldID;
        if (!$id) {
            return false;
        }

        // Non-staged objects are considered "published" if saved
        if (!$this->hasStages()) {
            return true;
        }

        $liveVersion = static::get_versionnumber_by_stage($this->owner, Versioned::LIVE, $id);
        return (bool)$liveVersion;
    }
public function isPublished ( ) { $ id = $ this -> owner -> ID ? : $ this -> owner -> OldID ; if ( ! $ id ) { return false ; } // Non-staged objects are considered "published" if saved if ( ! $ this -> hasStages ( ) ) { return true ; } $ liveVersion = static :: get_versionnumber_by_stage ( $ this -> owner , Versioned :: LIVE , $ id ) ; return ( bool ) $ liveVersion ; }
Check if this record exists on live

@return bool
Check if this record exists on live