/**
  * @depends testCreateAndGetCampaignItemById
  */
 public function testRequiredAttributes()
 {
     $campaignItem = new CampaignItem();
     $this->assertTrue($campaignItem->unrestrictedSave());
     $id = $campaignItem->id;
     unset($campaignItem);
     $campaignItem = CampaignItem::getById($id);
     $this->assertEquals(0, $campaignItem->processed);
 }
Exemplo n.º 2
0
 public static function createNewActivity($type, $modelId, $personId, $url = null, $sourceIP = null)
 {
     $relatedModel = CampaignItem::getById(intval($modelId));
     if (!$relatedModel) {
         throw new NotFoundException();
     }
     $relationName = 'campaignItem';
     return parent::createNewChildActivity($type, $personId, $url, $relationName, $relatedModel, $sourceIP);
 }
Exemplo n.º 3
0
 public function actionDrillDownDetails($campaignItemId)
 {
     $id = (int) $campaignItemId;
     $campaignItem = CampaignItem::getById($id);
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($campaignItem->campaign);
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($campaignItem->contact);
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($campaignItem->emailMessage);
     echo CampaignItemSummaryListViewColumnAdapter::resolveDrillDownMetricsSummaryContent($campaignItem);
 }