Model/Sync/Campaign.php
private function isCampaignValid($campaign)
    {
        if (! $campaign->getCampaignId()) {
            $campaign->setMessage('Missing campaign id: ' . $campaign->getCampaignId())
                ->setSendStatus(\Dotdigitalgroup\Email\Model\Campaign::FAILED);
            $this->campaignResourceModel->saveItem($campaign);
            return false;
        } elseif (! $campaign->getEmail()) {
            $campaign->setMessage('Missing email')
                ->setSendStatus(\Dotdigitalgroup\Email\Model\Campaign::FAILED);
            $this->campaignResourceModel->saveItem($campaign);
            return false;
        }
        return true;
    }
private function isCampaignValid($campaign)
    {
        if (! $campaign->getCampaignId()) {
            $campaign->setMessage('Missing campaign id: ' . $campaign->getCampaignId())
                ->setSendStatus(\Dotdigitalgroup\Email\Model\Campaign::FAILED);
            $this->campaignResourceModel->saveItem($campaign);
            return false;
        } elseif (! $campaign->getEmail()) {
            $campaign->setMessage('Missing email')
                ->setSendStatus(\Dotdigitalgroup\Email\Model\Campaign::FAILED);
            $this->campaignResourceModel->saveItem($campaign);
            return false;
        }
        return true;
    }
private function isCampaignValid ( $ campaign ) { if ( ! $ campaign -> getCampaignId ( ) ) { $ campaign -> setMessage ( 'Missing campaign id: ' . $ campaign -> getCampaignId ( ) ) -> setSendStatus ( \ Dotdigitalgroup \ Email \ Model \ Campaign :: FAILED ) ; $ this -> campaignResourceModel -> saveItem ( $ campaign ) ; return false ; } elseif ( ! $ campaign -> getEmail ( ) ) { $ campaign -> setMessage ( 'Missing email' ) -> setSendStatus ( \ Dotdigitalgroup \ Email \ Model \ Campaign :: FAILED ) ; $ this -> campaignResourceModel -> saveItem ( $ campaign ) ; return false ; } return true ; }
Check if campaign item is valid

@param \Dotdigitalgroup\Email\Model\Campaign $campaign

@return bool
Check if campaign item is valid