From 7a306603bf86a9bce28c40acf66deab3eb4f8d89 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Mon, 6 Jan 2025 16:10:58 +1300 Subject: [PATCH] API Remove deprecated extension hooks We don't really have a way to deprecate these per-se, but they were removed in other admin sections already so it's time to remove them from here as well. --- code/LeftAndMain.php | 1 - code/ModalController.php | 1 - code/ModelAdmin.php | 13 ------------- 3 files changed, 15 deletions(-) diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index b6e2c6ef1..f328a6421 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -45,7 +45,6 @@ use SilverStripe\Model\ArrayData; use SilverStripe\View\Requirements; use SilverStripe\View\SSViewer; -use SilverStripe\Dev\Deprecation; /** * LeftAndMain is the parent class of all the two-pane views in the CMS. diff --git a/code/ModalController.php b/code/ModalController.php index 58844e034..c42632070 100644 --- a/code/ModalController.php +++ b/code/ModalController.php @@ -10,7 +10,6 @@ use SilverStripe\Control\HTTPResponse; use SilverStripe\Core\Injector\Injector; use SilverStripe\Forms\Form; -use SilverStripe\Dev\Deprecation; /** * Parent controller for all CMS-global modals diff --git a/code/ModelAdmin.php b/code/ModelAdmin.php index 035279539..ce2f52cff 100644 --- a/code/ModelAdmin.php +++ b/code/ModelAdmin.php @@ -321,19 +321,6 @@ protected function getGridFieldConfig(): GridFieldConfig ->addComponent($exportButton) ->addComponents(Injector::inst()->createWithArgs(GridFieldPrintButton::class, ['buttons-before-left'])); - // Remove default and add our own filter header with extension points - // to retain API until deprecation in 5.0 - $config->removeComponentsByType(GridFieldFilterHeader::class); - $config->addComponent(Injector::inst()->createWithArgs(GridFieldFilterHeader::class, [ - false, - function ($context) { - $this->extend('updateSearchContext', $context); - }, - function ($form) { - $this->extend('updateSearchForm', $form); - } - ])); - if (!$this->showSearchForm || (is_array($this->showSearchForm) && !in_array($this->getModelClass(), $this->showSearchForm ?? [])) ) {