protected function resolveAndRenderView(View $messageView)
 {
     $gridViewId = 'notUsed';
     $pageVar = 'notUsed';
     $listModel = new Campaign();
     $actionBarView = new SecuredActionBarForMarketingListsSearchAndListView('default', 'marketing', $listModel, $gridViewId, $pageVar, false, $this->activeActionElementType);
     $mixedView = new ActionBarAndZeroModelsYetView($actionBarView, $messageView);
     $view = new CampaignsPageView(MarketingDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this->controller, $mixedView, $this->breadcrumbLinks, 'MarketingBreadCrumbView'));
     echo $view->render();
 }
 protected function processEdit(Campaign $campaign)
 {
     if ($campaign->status != Campaign::STATUS_ACTIVE) {
         Yii::app()->user->setFlash('notification', Zurmo::t('CampaignsModule', 'This campaign has already started, you can only edit its name, rights and permissions.'));
     }
     $breadCrumbLinks = static::getDetailsAndEditBreadcrumbLinks();
     $breadCrumbLinks[] = StringUtil::getChoppedStringContent(strval($campaign), 25);
     //todo: wizard
     $editView = new CampaignEditView($this->getId(), $this->getModule()->getId(), $this->attemptToSaveModelFromPost($campaign), strval($campaign));
     $view = new CampaignsPageView(MarketingDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $editView, $breadCrumbLinks, 'MarketingBreadCrumbView'));
     echo $view->render();
 }
 public function actionEdit($id)
 {
     $campaign = Campaign::getById(intval($id));
     ControllerSecurityUtil::resolveAccessCanCurrentUserWriteModel($campaign);
     $breadcrumbLinks = static::getDetailsAndEditBreadcrumbLinks();
     $breadcrumbLinks[] = StringUtil::getChoppedStringContent(strval($campaign), 25);
     //todo: wizard
     $editView = new CampaignEditView($this->getId(), $this->getModule()->getId(), $this->attemptToSaveModelFromPost($campaign), strval($campaign));
     $view = new CampaignsPageView(MarketingDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $editView, $breadcrumbLinks, 'MarketingBreadCrumbView'));
     echo $view->render();
 }