Skip to content

Commit

Permalink
API Deprecate API being removed in CMS 6 (#1908)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Feb 26, 2025
1 parent a3ec77b commit 58c0208
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions code/LeftAndMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ class LeftAndMain extends Controller implements PermissionProvider

/**
* Form schema header identifier
* @deprecated 2.4.0 use SilverStripe\Forms\Schema\FormSchema::SCHEMA_HEADER instead.
*/
const SCHEMA_HEADER = 'X-Formschema-Request';
const SCHEMA_HEADER = FormSchema::SCHEMA_HEADER;

/**
* Enable front-end debugging (increases verbosity) in dev mode.
Expand Down Expand Up @@ -530,7 +531,7 @@ public function methodSchema(HTTPRequest $request): HTTPResponse
*/
protected function getSchemaRequested()
{
$parts = $this->getRequest()->getHeader(static::SCHEMA_HEADER);
$parts = $this->getRequest()->getHeader(FormSchema::SCHEMA_HEADER);
return !empty($parts);
}

Expand All @@ -544,7 +545,7 @@ protected function getSchemaRequested()
*/
protected function getSchemaResponse($schemaID, $form = null, ValidationResult $errors = null, $extraData = []): HTTPResponse
{
$parts = $this->getRequest()->getHeader(static::SCHEMA_HEADER);
$parts = $this->getRequest()->getHeader(FormSchema::SCHEMA_HEADER);
$data = $this
->getFormSchema()
->getMultipartSchema($parts, $schemaID, $form, $errors);
Expand Down Expand Up @@ -1271,9 +1272,11 @@ public function Breadcrumbs($unlinked = false)
*
* @throws InvalidArgumentException
* @return LeftAndMain_SearchFilter
* @deprecated 2.4.0 Will be removed without equivalent functionality to replace it.
*/
protected function getSearchFilter()
{
Deprecation::noticeWithNoReplacment('2.4.0');
if ($this->searchFilterCache) {
return $this->searchFilterCache;
}
Expand Down
1 change: 1 addition & 0 deletions code/LeftAndMain_SearchFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/**
* Abstract interface for a class which may be used to filter the results displayed
* in a nested tree
* @deprecated 2.4.0 Will be removed without equivalent functionality to replace it.
*/
interface LeftAndMain_SearchFilter
{
Expand Down

0 comments on commit 58c0208

Please sign in to comment.