@@ -318,9 +318,14 @@ public function setSearchContext(SearchContext $context): static
318318 *
319319 * @param GridField $gridfield
320320 * @return string
321+ * @deprecated 5.4.0 Will be replaced with SilverStripe\ORM\Search\SearchContextForm::getSchemaData()
321322 */
322323 public function getSearchFieldSchema (GridField $ gridField )
323324 {
325+ Deprecation::noticeWithNoReplacment (
326+ '5.4.0 ' ,
327+ 'Will be replaced with SilverStripe\ORM\Search\SearchContextForm::getSchemaData() '
328+ );
324329 $ schemaUrl = Controller::join_links ($ gridField ->Link (), 'schema/SearchForm ' );
325330 $ inst = singleton ($ gridField ->getModelClass ());
326331 $ context = $ this ->getSearchContext ($ gridField );
@@ -424,17 +429,22 @@ public function getSearchForm(GridField $gridField)
424429 *
425430 * @param GridField $gridfield
426431 * @return HTTPResponse
432+ * @deprecated 5.4.0 Will be replaced with SilverStripe\Forms\FormRequestHandler::getSchema()
427433 */
428434 public function getSearchFormSchema (GridField $ gridField )
429435 {
436+ Deprecation::noticeWithNoReplacment (
437+ '5.4.0 ' ,
438+ 'Will be replaced with SilverStripe\Forms\FormRequestHandler::getSchema() '
439+ );
430440 $ form = $ this ->getSearchForm ($ gridField );
431441
432442 // If there are no filterable fields, return a 400 response
433443 if (!$ form ) {
434444 return new HTTPResponse (_t (__CLASS__ . '.SearchFormFaliure ' , 'No search form could be generated ' ), 400 );
435445 }
436446
437- $ parts = $ gridField ->getRequest ()->getHeader (LeftAndMain ::SCHEMA_HEADER );
447+ $ parts = $ gridField ->getRequest ()->getHeader (FormSchema ::SCHEMA_HEADER );
438448 $ schemaID = $ gridField ->getRequest ()->getURL ();
439449 $ data = FormSchema::singleton ()
440450 ->getMultipartSchema ($ parts , $ schemaID , $ form );
0 commit comments