Example #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);
     }
 }
Example #2
0
 /**
  * RowCampaign constructor.
  * @param CampaignInterface $campaign
  * @param AdGroup $adGroup
  */
 public function __construct(CampaignInterface $campaign, AdGroup $adGroup)
 {
     // キーワード行:追加
     $ad_keyword = new RowKeyword($campaign, $adGroup);
     foreach ($ad_keyword->getContainers() as $container) {
         array_push($this->containers, $container);
     }
     // 広告行:固有のパラメータを設定して追加
     $container = new ColumnContainer();
     $container->setCampaignName($campaign->getCampaignName());
     $container->setAdGroupName($adGroup->getName());
     $container->setComponentType('広告');
     $container->setIsDelivery('オン');
     $container->setAdName($adGroup->getAdContents()->getAdInnerName());
     $container->setAdTitle($adGroup->getAdContents()->getHeadline());
     $container->setAdDescription1($adGroup->getAdContents()->getDescription1());
     $container->setAdDescription2($adGroup->getAdContents()->getDescription2());
     $container->setAdDisplayUrl($adGroup->getAdContents()->getDisplayUrl());
     $container->setAdLinkUrl($adGroup->getAdContents()->getLinkUrl());
     $container->setAdType('テキスト(15・19-19)');
     array_push($this->containers, $container);
 }