File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed
app/code/Magento/MediaGalleryUi
Controller/Adminhtml/Directories Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 11
11
use Magento \Framework \App \Action \HttpGetActionInterface ;
12
12
use Magento \Framework \Controller \Result \Json ;
13
13
use Magento \Framework \Controller \ResultFactory ;
14
- use Magento \MediaGalleryUi \Model \Directories \FolderTree ;
14
+ use Magento \MediaGalleryUi \Model \Directories \GetFolderTree ;
15
15
use Psr \Log \LoggerInterface ;
16
16
17
17
/**
@@ -33,33 +33,33 @@ class GetTree extends Action implements HttpGetActionInterface
33
33
private $ logger ;
34
34
35
35
/**
36
- * @var FolderTree
36
+ * @var GetFolderTree
37
37
*/
38
- private $ folderTree ;
38
+ private $ getFolderTree ;
39
39
40
40
/**
41
41
* Constructor
42
42
*
43
43
* @param Action\Context $context
44
44
* @param LoggerInterface $logger
45
- * @param FolderTree $folderTree
45
+ * @param GetFolderTree $getFolderTree
46
46
*/
47
47
public function __construct (
48
48
Action \Context $ context ,
49
49
LoggerInterface $ logger ,
50
- FolderTree $ folderTree
50
+ GetFolderTree $ getFolderTree
51
51
) {
52
52
parent ::__construct ($ context );
53
53
$ this ->logger = $ logger ;
54
- $ this ->folderTree = $ folderTree ;
54
+ $ this ->getFolderTree = $ getFolderTree ;
55
55
}
56
56
/**
57
57
* @inheritdoc
58
58
*/
59
59
public function execute ()
60
60
{
61
61
try {
62
- $ responseContent [] = $ this ->folderTree -> buildTree ();
62
+ $ responseContent [] = $ this ->getFolderTree -> execute ();
63
63
$ responseCode = self ::HTTP_OK ;
64
64
} catch (\Exception $ exception ) {
65
65
$ this ->logger ->critical ($ exception );
Original file line number Diff line number Diff line change 15
15
/**
16
16
* Build folder tree structure by path
17
17
*/
18
- class FolderTree
18
+ class GetFolderTree
19
19
{
20
20
/**
21
21
* @var Filesystem
@@ -56,7 +56,7 @@ public function __construct(
56
56
* @return array
57
57
* @throws ValidatorException
58
58
*/
59
- public function buildTree (bool $ skipRoot = true ): array
59
+ public function execute (bool $ skipRoot = true ): array
60
60
{
61
61
return $ this ->buildFolderTree ($ this ->getDirectories (), $ skipRoot );
62
62
}
Original file line number Diff line number Diff line change 28
28
</argument >
29
29
</arguments >
30
30
</type >
31
- <type name =" Magento\MediaGalleryUi\Model\Directories\FolderTree " >
31
+ <type name =" Magento\MediaGalleryUi\Model\Directories\GetFolderTree " >
32
32
<arguments >
33
33
<argument name =" path" xsi : type =" string" >media</argument >
34
34
</arguments >
You can’t perform that action at this time.
0 commit comments