public function actionActivate() { $campaignNames = array("clientj6", "clientj8"); foreach ($campaignNames as $key => $currentCampaignName) { $activateObj = new ActivateCampaign($currentCampaignName); $activateObj->activate(); } Yii::app()->user->setFlash('success', "<strong>Campaign Activated!</strong> Campaign is now activated."); $this->redirect(Yii::app()->homeUrl); }
public function actionActivate($campaign) { $campaign = trim($campaign); $campaign = ltrim($campaign); $campaign = rtrim($campaign); $activateObj = new ActivateCampaign($campaign); $activateObj->activate(); Yii::app()->user->setFlash('success', "<strong>{$campaign} Activated!</strong> Campaign {$campaign} is now activated."); $this->redirect(Yii::app()->request->urlReferrer); }