From 6d0e676b0455308e1c7b915a05097e0a702b9bd9 Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Fri, 29 Sep 2023 10:27:11 +0200 Subject: [PATCH] Move `getFilter()` method to `ipl\Web\Compat\CompatController::class` --- application/controllers/ChannelsController.php | 17 ----------------- application/controllers/ContactsController.php | 17 ----------------- .../controllers/EventRulesController.php | 17 ----------------- application/controllers/EventsController.php | 17 ----------------- 4 files changed, 68 deletions(-) diff --git a/application/controllers/ChannelsController.php b/application/controllers/ChannelsController.php index 1e87254a..be3f8d24 100644 --- a/application/controllers/ChannelsController.php +++ b/application/controllers/ChannelsController.php @@ -31,9 +31,6 @@ class ChannelsController extends CompatController /** @var Connection */ private $db; - /** @var Filter\Rule Filter from query string parameters */ - private $filter; - public function init() { $this->assertPermission('config/modules'); @@ -155,20 +152,6 @@ public function searchEditorAction(): void $this->setTitle($this->translate('Adjust Filter')); } - /** - * Get the filter created from query string parameters - * - * @return Filter\Rule - */ - protected function getFilter(): Filter\Rule - { - if ($this->filter === null) { - $this->filter = QueryString::parse((string) $this->params); - } - - return $this->filter; - } - /** * Merge tabs with other tabs contained in this tab panel * diff --git a/application/controllers/ContactsController.php b/application/controllers/ContactsController.php index df0b1adf..8e0b362a 100644 --- a/application/controllers/ContactsController.php +++ b/application/controllers/ContactsController.php @@ -30,9 +30,6 @@ class ContactsController extends CompatController /** @var Connection */ private $db; - /** @var Filter\Rule Filter from query string parameters */ - private $filter; - public function init() { $this->assertPermission('notifications/config/contacts'); @@ -159,20 +156,6 @@ public function searchEditorAction(): void $this->setTitle($this->translate('Adjust Filter')); } - /** - * Get the filter created from query string parameters - * - * @return Filter\Rule - */ - protected function getFilter(): Filter\Rule - { - if ($this->filter === null) { - $this->filter = QueryString::parse((string) $this->params); - } - - return $this->filter; - } - public function getTabs() { if ($this->getRequest()->getActionName() === 'index') { diff --git a/application/controllers/EventRulesController.php b/application/controllers/EventRulesController.php index 21e89a91..ffcc6133 100644 --- a/application/controllers/EventRulesController.php +++ b/application/controllers/EventRulesController.php @@ -32,9 +32,6 @@ class EventRulesController extends CompatController { use SearchControls; - /** @var Filter\Rule Filter from query string parameters */ - private $filter; - /** @var Session\SessionNamespace */ private $sessionNamespace; @@ -220,20 +217,6 @@ public function addSearchEditorAction(): void $this->setTitle($this->translate('Adjust Filter')); } - /** - * Get the filter created from query string parameters - * - * @return Filter\Rule - */ - protected function getFilter(): Filter\Rule - { - if ($this->filter === null) { - $this->filter = QueryString::parse((string) $this->params); - } - - return $this->filter; - } - public function getTabs() { if ($this->getRequest()->getActionName() === 'index') { diff --git a/application/controllers/EventsController.php b/application/controllers/EventsController.php index 8b7bf794..7ad03a94 100644 --- a/application/controllers/EventsController.php +++ b/application/controllers/EventsController.php @@ -22,9 +22,6 @@ class EventsController extends CompatController use Auth; use SearchControls; - /** @var Filter\Rule Filter from query string parameters */ - private $filter; - public function indexAction(): void { $this->addTitleTab(t('Events')); @@ -119,18 +116,4 @@ public function searchEditorAction(): void $this->getDocument()->add($editor); $this->setTitle(t('Adjust Filter')); } - - /** - * Get the filter created from query string parameters - * - * @return Filter\Rule - */ - protected function getFilter(): Filter\Rule - { - if ($this->filter === null) { - $this->filter = QueryString::parse((string) $this->params); - } - - return $this->filter; - } }