From fc7883bf981afa1425f38521ac57f7c512050941 Mon Sep 17 00:00:00 2001 From: Alf Drollinger Date: Thu, 20 Jun 2024 13:39:28 +0200 Subject: [PATCH] Base classes instead of cond loading for Advanced Tables --- composer.json | 2 +- packages/core/config/core.php | 8 +++++++- packages/core/src/Base/BaseRelationManager.php | 15 +++++++++++++++ packages/core/src/Base/BaseResource.php | 15 +++++++++++++++ packages/core/src/Base/BaseWidget.php | 15 +++++++++++++++ packages/core/src/Traits/UseAdvancedTables.php | 18 ------------------ 6 files changed, 53 insertions(+), 20 deletions(-) create mode 100644 packages/core/src/Base/BaseRelationManager.php create mode 100644 packages/core/src/Base/BaseResource.php create mode 100644 packages/core/src/Base/BaseWidget.php delete mode 100644 packages/core/src/Traits/UseAdvancedTables.php diff --git a/composer.json b/composer.json index 30a23b48f..9362d8927 100644 --- a/composer.json +++ b/composer.json @@ -116,4 +116,4 @@ }, "minimum-stability": "dev", "prefer-stable": true -} +} \ No newline at end of file diff --git a/packages/core/config/core.php b/packages/core/config/core.php index 0b728914b..d8d8bc60b 100644 --- a/packages/core/config/core.php +++ b/packages/core/config/core.php @@ -2,6 +2,12 @@ return [ - 'use_advanced_tables' => true, + /* + | Set to false to disable advanced tables + | If true, the advanced tables plugin will be + | automatically loaded, if it is installed and enabled + | https://filamentphp.com/plugins/kenneth-sese-advanced-tables + */ + 'use_advanced_tables' => false, ]; diff --git a/packages/core/src/Base/BaseRelationManager.php b/packages/core/src/Base/BaseRelationManager.php new file mode 100644 index 000000000..d0c2714e0 --- /dev/null +++ b/packages/core/src/Base/BaseRelationManager.php @@ -0,0 +1,15 @@ +$method = \Closure::fromCallable([\Archilex\AdvancedTables\AdvancedTables::class, $method])->bindTo($this, self::class); - } - } - } -}