Skip to content

Commit

Permalink
Add adminbundle package and use symfony file system (#8)
Browse files Browse the repository at this point in the history
* Add adminbundle package and use symfony file system

* Remove unused import
  • Loading branch information
aryaantony92 authored Apr 13, 2023
1 parent d12fa6d commit a071fd2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
5 changes: 2 additions & 3 deletions src/Controller/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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');

Expand All @@ -198,7 +197,7 @@ public function addFolderAction(Request $request): JsonResponse
}

if (is_writable(dirname($file))) {
File::mkdir($file);
$filesystem->mkdir($file);

$success = true;
}
Expand Down

0 comments on commit a071fd2

Please sign in to comment.