From 300fb02fd6518ecb77be02e92edfe8f16aa050cd Mon Sep 17 00:00:00 2001 From: Ryan Mitchell Date: Fri, 12 Jul 2024 16:17:13 +0100 Subject: [PATCH] Remove initial_path from import and export data --- src/Commands/ExportNavs.php | 2 -- src/Structures/CollectionTree.php | 5 +---- src/Structures/Nav.php | 2 -- src/Structures/NavTree.php | 5 +---- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Commands/ExportNavs.php b/src/Commands/ExportNavs.php index 2808654e..7e628ae4 100644 --- a/src/Commands/ExportNavs.php +++ b/src/Commands/ExportNavs.php @@ -81,7 +81,6 @@ private function exportNavs() ->collections($model->settings['collections'] ?? null) ->maxDepth($model->settings['max_depth'] ?? null) ->expectsRoot($model->settings['expects_root'] ?? false) - ->initialPath($model->settings['initial_path'] ?? null) ->save(); }); @@ -106,7 +105,6 @@ private function exportNavTrees() ->tree($treeModel->tree) ->handle($treeModel->handle) ->locale($treeModel->locale) - ->initialPath($treeModel->settings['initial_path'] ?? null) ->syncOriginal() ->save(); }); diff --git a/src/Structures/CollectionTree.php b/src/Structures/CollectionTree.php index c1ef2ec3..c8af467e 100644 --- a/src/Structures/CollectionTree.php +++ b/src/Structures/CollectionTree.php @@ -15,7 +15,6 @@ public static function fromModel(Model $model) ->tree($model->tree) ->handle($model->handle) ->locale($model->locale) - ->initialPath($model->settings['initial_path'] ?? null) ->syncOriginal() ->model($model); } @@ -35,9 +34,7 @@ public static function makeModelFromContract($source) 'locale' => $source->locale(), ])->fill([ 'tree' => $source->tree(), - 'settings' => [ - 'initial_path' => $source->initialPath(), - ], + 'settings' => [], ]); } diff --git a/src/Structures/Nav.php b/src/Structures/Nav.php index da60befe..36c90f95 100644 --- a/src/Structures/Nav.php +++ b/src/Structures/Nav.php @@ -18,7 +18,6 @@ public static function fromModel(Model $model) ->collections($model->settings['collections'] ?? null) ->maxDepth($model->settings['max_depth'] ?? null) ->expectsRoot($model->settings['expects_root'] ?? false) - ->initialPath($model->settings['initial_path'] ?? null) ->model($model); } @@ -42,7 +41,6 @@ public static function makeModelFromContract(Contract $source) 'collections' => $source->collections()->map->handle(), 'max_depth' => $source->maxDepth(), 'expects_root' => $source->expectsRoot(), - 'initial_path' => $source->initialPath(), ], ]); } diff --git a/src/Structures/NavTree.php b/src/Structures/NavTree.php index 92e252cb..14220d0f 100644 --- a/src/Structures/NavTree.php +++ b/src/Structures/NavTree.php @@ -15,7 +15,6 @@ public static function fromModel(Model $model) ->tree($model->tree) ->handle($model->handle) ->locale($model->locale) - ->initialPath($model->settings['initial_path'] ?? null) ->syncOriginal() ->model($model); } @@ -37,9 +36,7 @@ public static function makeModelFromContract($source) 'locale' => $source->locale(), ])->fill([ 'tree' => ($isFileEntry || $source->model) ? $source->tree() : [], - 'settings' => [ - 'initial_path' => $source->initialPath(), - ], + 'settings' => [], ]); }