From f7751b7997dcf9a2b037918d394f360166121dc9 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 21 Nov 2024 19:06:06 +1300 Subject: [PATCH] API Deprecate campaign admin integrations --- code/Controllers/CMSPageEditController.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/Controllers/CMSPageEditController.php b/code/Controllers/CMSPageEditController.php index b15ff27527..cc11570c81 100644 --- a/code/Controllers/CMSPageEditController.php +++ b/code/Controllers/CMSPageEditController.php @@ -13,6 +13,7 @@ use SilverStripe\ORM\ArrayLib; use SilverStripe\ORM\FieldType\DBHTMLText; use SilverStripe\ORM\ValidationResult; +use SilverStripe\Dev\Deprecation; /** * @package cms @@ -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); @@ -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); @@ -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);