|
5 | 5 | */
|
6 | 6 | namespace Magento\Cms\Block\Adminhtml\Wysiwyg\Images;
|
7 | 7 |
|
8 |
| -use Magento\Framework\Filesystem; |
9 |
| - |
10 | 8 | /**
|
11 | 9 | * Directory tree renderer for Cms Wysiwyg Images
|
12 | 10 | *
|
@@ -34,33 +32,25 @@ class Tree extends \Magento\Backend\Block\Template
|
34 | 32 | */
|
35 | 33 | private $serializer;
|
36 | 34 |
|
37 |
| - /** |
38 |
| - * @var Filesystem |
39 |
| - */ |
40 |
| - private $fileSystem; |
41 |
| - |
42 | 35 | /**
|
43 | 36 | * @param \Magento\Backend\Block\Template\Context $context
|
44 | 37 | * @param \Magento\Cms\Helper\Wysiwyg\Images $cmsWysiwygImages
|
45 | 38 | * @param \Magento\Framework\Registry $registry
|
46 | 39 | * @param array $data
|
47 |
| - * @param Filesystem $fileSystem |
48 | 40 | * @param \Magento\Framework\Serialize\Serializer\Json|null $serializer
|
49 | 41 | * @throws \RuntimeException
|
50 | 42 | */
|
51 | 43 | public function __construct(
|
52 | 44 | \Magento\Backend\Block\Template\Context $context,
|
53 | 45 | \Magento\Cms\Helper\Wysiwyg\Images $cmsWysiwygImages,
|
54 | 46 | \Magento\Framework\Registry $registry,
|
55 |
| - Filesystem $fileSystem, |
56 | 47 | array $data = [],
|
57 | 48 | \Magento\Framework\Serialize\Serializer\Json $serializer = null
|
58 | 49 | ) {
|
59 | 50 | $this->_coreRegistry = $registry;
|
60 | 51 | $this->_cmsWysiwygImages = $cmsWysiwygImages;
|
61 | 52 | $this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance()
|
62 | 53 | ->get(\Magento\Framework\Serialize\Serializer\Json::class);
|
63 |
| - $this->fileSystem = $fileSystem; |
64 | 54 | parent::__construct($context, $data);
|
65 | 55 | }
|
66 | 56 |
|
@@ -111,7 +101,7 @@ private function getFilteredNestedDirectories(string $storageRoot, string $fileN
|
111 | 101 | $result = [];
|
112 | 102 | $pathList = $this->getMediaDirectory()->read($fileName);
|
113 | 103 | foreach ($pathList as $directoryPath) {
|
114 |
| - $directory = $this->fileSystem->getDirectoryReadByPath($storageRoot . $directoryPath); |
| 104 | + $directory = $this->_filesystem->getDirectoryReadByPath($storageRoot . $directoryPath); |
115 | 105 | if (!$directory->isDirectory()) {
|
116 | 106 | continue;
|
117 | 107 | }
|
|
0 commit comments