예제 #1
0
 /**
  * RowCampaign constructor.
  * @param CampaignInterface $campaign
  * @param AdGroup $adGroup
  */
 public function __construct(CampaignInterface $campaign, AdGroup $adGroup)
 {
     // 広告行:固有のパラメータを設定して追加
     $container = new ColumnContainer();
     $container->setCampaign($campaign->getCampaignName());
     $container->setAdGroup($adGroup->getName());
     $container->setHeadline($adGroup->getAdContents()->getHeadline());
     $container->setDescriptionLine1($adGroup->getAdContents()->getDescription1());
     $container->setDescriptionLine2($adGroup->getAdContents()->getDescription2());
     $container->setDisplayUrl($adGroup->getAdContents()->getDisplayUrl());
     $container->setFinalUrl($adGroup->getAdContents()->getLinkUrl());
     $container->setDevicePreference('All');
     $container->setCampaignStatus('Active');
     $container->setAdGroupStatus('Active');
     $container->setStatus('Active');
     array_push($this->containers, $container);
     // キーワード行:追加
     $ad_keyword = new RowKeyword($campaign, $adGroup);
     foreach ($ad_keyword->getContainers() as $container) {
         array_push($this->containers, $container);
     }
 }