From a071fd2d15707e3c7cb821e0339ef4e8295db5fc Mon Sep 17 00:00:00 2001 From: aryaantony92 <97134765+aryaantony92@users.noreply.github.com> Date: Thu, 13 Apr 2023 16:48:14 +0200 Subject: [PATCH] Add adminbundle package and use symfony file system (#8) * Add adminbundle package and use symfony file system * Remove unused import --- composer.json | 3 ++- src/Controller/SettingsController.php | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index f32e53c..d2aa5b9 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,8 @@ "minimum-stability": "dev", "require": { "php": "^8.1", - "pimcore/pimcore": "^11.0" + "pimcore/pimcore": "^11.0", + "pimcore/admin-ui-classic-bundle": "^1.0" }, "autoload": { "psr-4": { diff --git a/src/Controller/SettingsController.php b/src/Controller/SettingsController.php index b3c6eb8..43881f0 100644 --- a/src/Controller/SettingsController.php +++ b/src/Controller/SettingsController.php @@ -16,7 +16,6 @@ namespace Pimcore\Bundle\FileExplorerBundle\Controller; use Pimcore\Bundle\AdminBundle\Controller\AdminController; -use Pimcore\File; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; @@ -182,7 +181,7 @@ public function addAction(Request $request, Filesystem $filesystem): JsonRespons * * @throws \Exception */ - public function addFolderAction(Request $request): JsonResponse + public function addFolderAction(Request $request, Filesystem $filesystem): JsonResponse { $this->checkPermission('fileexplorer'); @@ -198,7 +197,7 @@ public function addFolderAction(Request $request): JsonResponse } if (is_writable(dirname($file))) { - File::mkdir($file); + $filesystem->mkdir($file); $success = true; }