Cleanup PHPDoc and use injector for AddToCampaignHandler

This commit is contained in:
Damian Mooyman 2016-04-26 11:56:37 +12:00
parent 69d7a3ae7d
commit 7a36789130

View File

@ -1,4 +1,6 @@
<?php <?php
use SilverStripe\Model\FieldType\DBHTMLText;
/** /**
* The main "content" area of the CMS. * The main "content" area of the CMS.
* *
@ -1191,8 +1193,15 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
return $this->getResponseNegotiator()->respond($this->getRequest()); return $this->getResponseNegotiator()->respond($this->getRequest());
} }
/**
* Action handler for adding pages to a campaign
*
* @param array $data
* @param Form $form
* @return DBHTMLText|SS_HTTPResponse
*/
public function addtocampaign($data, $form) { public function addtocampaign($data, $form) {
$handler = new AddToCampaignHandler($form, $data); $handler = AddToCampaignHandler::create($form, $data);
return $handler->handle(); return $handler->handle();
} }