Skip to content

Commit

Permalink
Cleanup PHPDoc and use injector for AddToCampaignHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian Mooyman committed Apr 25, 2016
1 parent 69d7a3a commit 7a36789
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion code/controllers/CMSMain.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
use SilverStripe\Model\FieldType\DBHTMLText;

/**
* The main "content" area of the CMS.
*
Expand Down Expand Up @@ -1191,8 +1193,15 @@ public function doRollback($data, $form) {
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) {
$handler = new AddToCampaignHandler($form, $data);
$handler = AddToCampaignHandler::create($form, $data);
return $handler->handle();
}

Expand Down

0 comments on commit 7a36789

Please sign in to comment.