File tree Expand file tree Collapse file tree 9 files changed +29
-17
lines changed
Block/Adminhtml/Action/Edit Expand file tree Collapse file tree 9 files changed +29
-17
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public function getButtonData(): array
30
30
'label ' => new Phrase ('Back ' ),
31
31
'on_click ' => 'location.href = " ' . $ this ->urlBuilder ->getUrl ('*/*/ ' ) . '"; ' ,
32
32
'class ' => 'back ' ,
33
- 'sort_order ' => 10
33
+ 'sort_order ' => 10 ,
34
34
];
35
35
}
36
36
}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public function getButtonData(): array
18
18
'label ' => new Phrase ('Reset ' ),
19
19
'class ' => 'reset ' ,
20
20
'on_click ' => 'location.reload(); ' ,
21
- 'sort_order ' => 20
21
+ 'sort_order ' => 20 ,
22
22
];
23
23
}
24
24
}
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public function execute(ActionContextInterface $actionContext): ActionResultInte
48
48
return $ this ->createActionResult (
49
49
[
50
50
ArgumentReader::ERASE_ENTITY => $ this ->resolveEntity (...$ arguments ),
51
- 'canceled ' => $ this ->eraseManagement ->cancel (...$ arguments )
51
+ 'canceled ' => $ this ->eraseManagement ->cancel (...$ arguments ),
52
52
]
53
53
);
54
54
}
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public function execute(ActionContextInterface $actionContext): ActionResultInte
37
37
[
38
38
ArgumentReader::ERASE_ENTITY => $ this ->eraseManagement ->create (
39
39
...$ this ->getArguments ($ actionContext )
40
- )
40
+ ),
41
41
]
42
42
);
43
43
}
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public function execute(ActionContextInterface $actionContext): ActionResultInte
37
37
[
38
38
ArgumentReader::EXPORT_ENTITY => $ this ->exporter ->create (
39
39
...$ this ->getArguments ($ actionContext )
40
- )
40
+ ),
41
41
]
42
42
);
43
43
}
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public function execute(ActionContextInterface $actionContext): ActionResultInte
38
38
[
39
39
ExportArgumentReader::EXPORT_ENTITY => $ this ->exportEntityData ->export (
40
40
...$ this ->getArguments ($ actionContext )
41
- )
41
+ ),
42
42
]
43
43
);
44
44
}
Original file line number Diff line number Diff line change @@ -34,8 +34,11 @@ public function __construct(
34
34
35
35
public function get (): string
36
36
{
37
- return self ::PERFORMED_BY . ($ this ->authSession ->getUser ()
38
- ? $ this ->authSession ->getUser ()->getData ($ this ->attributeName )
39
- : '' );
37
+ return self ::PERFORMED_BY . $ this ->resolveUserName ();
38
+ }
39
+
40
+ private function resolveUserName (): string
41
+ {
42
+ return $ this ->authSession ->getUser () ? $ this ->authSession ->getUser ()->getData ($ this ->attributeName ) : 'Unknown ' ;
40
43
}
41
44
}
Original file line number Diff line number Diff line change @@ -50,13 +50,7 @@ public function __construct(
50
50
51
51
public function getDisclosureInformationHtml (): string
52
52
{
53
- return $ this ->blockHtml ?? $ this ->blockHtml = $ this ->blockFactory ->createBlock (
54
- Block::class,
55
- ['data ' => ['block_id ' => (string ) $ this ->scopeConfig ->getValue (
56
- self ::CONFIG_PATH_COOKIE_INFORMATION_BLOCK ,
57
- ScopeInterface::SCOPE_STORE
58
- )]]
59
- )->toHtml ();
53
+ return $ this ->blockHtml ?? $ this ->blockHtml = $ this ->createDisclosureInformationBlockHtml ();
60
54
}
61
55
62
56
public function getLearnMoreUrl (): string
@@ -66,4 +60,19 @@ public function getLearnMoreUrl(): string
66
60
ScopeInterface::SCOPE_STORE
67
61
)) ?? '# ' ;
68
62
}
63
+
64
+ private function createDisclosureInformationBlockHtml (): string
65
+ {
66
+ return $ this ->blockFactory ->createBlock (
67
+ Block::class,
68
+ [
69
+ 'data ' => [
70
+ 'block_id ' => (string ) $ this ->scopeConfig ->getValue (
71
+ self ::CONFIG_PATH_COOKIE_INFORMATION_BLOCK ,
72
+ ScopeInterface::SCOPE_STORE
73
+ ),
74
+ ],
75
+ ]
76
+ )->toHtml ();
77
+ }
69
78
}
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public function getEntityTypes(): array
40
40
{
41
41
$ entityTypes = [];
42
42
43
- foreach ($ this ->getList () as $ entity => $ types ) {
43
+ foreach ($ this ->getList () as $ types ) {
44
44
$ entityTypes [] = array_keys ($ types );
45
45
}
46
46
You can’t perform that action at this time.
0 commit comments