src/CampaignAdmin.php
protected function shouldCampaignSync(ChangeSet $item)
    {
        // Don't sync published changesets
        if ($item->State !== ChangeSet::STATE_OPEN) {
            return false;
        }

        // Get sync threshold
        $syncOlderThan = DBDatetime::now()->getTimestamp() - $this->config()->get('sync_expires');
        /** @var DBDatetime $lastSynced */
        $lastSynced = $item->dbObject('LastSynced');
        return !$lastSynced || $lastSynced->getTimestamp() < $syncOlderThan;
    }
protected function shouldCampaignSync(ChangeSet $item)
    {
        // Don't sync published changesets
        if ($item->State !== ChangeSet::STATE_OPEN) {
            return false;
        }

        // Get sync threshold
        $syncOlderThan = DBDatetime::now()->getTimestamp() - $this->config()->get('sync_expires');
        /** @var DBDatetime $lastSynced */
        $lastSynced = $item->dbObject('LastSynced');
        return !$lastSynced || $lastSynced->getTimestamp() < $syncOlderThan;
    }
protected function shouldCampaignSync ( ChangeSet $ item ) { // Don't sync published changesets if ( $ item -> State !== ChangeSet :: STATE_OPEN ) { return false ; } // Get sync threshold $ syncOlderThan = DBDatetime :: now ( ) -> getTimestamp ( ) - $ this -> config ( ) -> get ( 'sync_expires' ) ; /** @var DBDatetime $lastSynced */ $ lastSynced = $ item -> dbObject ( 'LastSynced' ) ; return ! $ lastSynced || $ lastSynced -> getTimestamp ( ) < $ syncOlderThan ; }
Check if the given campaign should be synced before view

@param ChangeSet $item
@return bool
Check if the given campaign should be synced before view