Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Deprecate campaign admin integrations #3028

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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