Skip to content

Commit

Permalink
API Deprecate campaign admin integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Nov 21, 2024
1 parent 58a4ae5 commit f7751b7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions code/Controllers/CMSPageEditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use SilverStripe\ORM\ArrayLib;
use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Dev\Deprecation;

/**
* @package cms
Expand Down Expand Up @@ -53,9 +54,12 @@ public function getClientConfig()

/**
* Action handler for adding pages to a campaign
*
* @deprecated 5.4.0 Will be removed without equivalent functionality to replace it
*/
public function addtocampaign(array $data, Form $form): HTTPResponse
{
Deprecation::noticeWithNoReplacment('5.4.0');
$id = $data['ID'];
$record = \Page::get()->byID($id);

Expand All @@ -81,9 +85,11 @@ public function addtocampaign(array $data, Form $form): HTTPResponse
*
* @param HTTPRequest $request
* @return Form
* @deprecated 5.4.0 Will be removed without equivalent functionality to replace it
*/
public function AddToCampaignForm($request)
{
Deprecation::noticeWithNoReplacment('5.4.0');
// Get ID either from posted back value, or url parameter
$id = $request->param('ID') ?: $request->postVar('ID');
return $this->getAddToCampaignForm($id);
Expand All @@ -92,9 +98,11 @@ public function AddToCampaignForm($request)
/**
* @param int $id
* @return Form
* @deprecated 5.4.0 Will be removed without equivalent functionality to replace it
*/
public function getAddToCampaignForm($id)
{
Deprecation::noticeWithNoReplacment('5.4.0');
// Get record-specific fields
$record = SiteTree::get()->byID($id);

Expand Down

0 comments on commit f7751b7

Please sign in to comment.