File tree Expand file tree Collapse file tree 8 files changed +19
-23
lines changed
app/code/Magento/AdminAnalytics
Controller/Adminhtml/Config Expand file tree Collapse file tree 8 files changed +19
-23
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \AdminAnalytics \Block ;
7
7
8
- use Magento \Framework \ View \ Element \Template ;
9
- use Magento \Framework \ View \ Element \Template \Context ;
8
+ use Magento \Backend \ Block \Template ;
9
+ use Magento \Backend \ Block \Template \Context ;
10
10
use Magento \Framework \App \ProductMetadataInterface ;
11
11
use Magento \Backend \Model \Auth \Session ;
12
12
use Magento \Framework \App \State ;
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ class Notification implements ArgumentInterface
27
27
private $ canViewNotificationRelease ;
28
28
29
29
/**
30
- * Notification constructor.
31
30
* @param AdminAnalyticsNotification $canViewNotificationAnalytics
32
31
* @param ReleaseNotification $canViewNotificationRelease
33
32
*/
Original file line number Diff line number Diff line change @@ -38,10 +38,10 @@ class DisableAdminUsage extends Action implements HttpPostActionInterface
38
38
/**
39
39
* DisableAdminUsage constructor.
40
40
*
41
- * @param Action\Context $context
41
+ * @param Action\Context $context
42
42
* @param ProductMetadataInterface $productMetadata
43
- * @param NotificationLogger $notificationLogger
44
- * @param Factory $configFactory
43
+ * @param NotificationLogger $notificationLogger
44
+ * @param Factory $configFactory
45
45
*/
46
46
public function __construct (
47
47
Action \Context $ context ,
@@ -56,7 +56,7 @@ public function __construct(
56
56
}
57
57
58
58
/**
59
- * Changes the value of config/admin/usage/enabled
59
+ * Change the value of config/admin/usage/enabled
60
60
*/
61
61
private function disableAdminUsage ()
62
62
{
@@ -70,7 +70,7 @@ private function disableAdminUsage()
70
70
*
71
71
* @return ResultInterface
72
72
*/
73
- private function markUserNotified () : ResultInterface
73
+ private function markUserNotified (): ResultInterface
74
74
{
75
75
$ responseContent = [
76
76
'success ' => $ this ->notificationLogger ->log (
Original file line number Diff line number Diff line change @@ -36,12 +36,10 @@ class EnableAdminUsage extends Action implements HttpPostActionInterface
36
36
private $ notificationLogger ;
37
37
38
38
/**
39
- * MarkUserNotified constructor.
40
- *
41
- * @param Action\Context $context
39
+ * @param Action\Context $context
42
40
* @param ProductMetadataInterface $productMetadata
43
- * @param NotificationLogger $notificationLogger
44
- * @param Factory $configFactory
41
+ * @param NotificationLogger $notificationLogger
42
+ * @param Factory $configFactory
45
43
*/
46
44
public function __construct (
47
45
Action \Context $ context ,
@@ -56,7 +54,7 @@ public function __construct(
56
54
}
57
55
58
56
/**
59
- * Changes the value of config/admin/usage/enabled
57
+ * Change the value of config/admin/usage/enabled
60
58
*/
61
59
private function enableAdminUsage ()
62
60
{
@@ -70,7 +68,7 @@ private function enableAdminUsage()
70
68
*
71
69
* @return ResultInterface
72
70
*/
73
- private function markUserNotified () : ResultInterface
71
+ private function markUserNotified (): ResultInterface
74
72
{
75
73
$ responseContent = [
76
74
'success ' => $ this ->notificationLogger ->log (
Original file line number Diff line number Diff line change 12
12
use Magento \Framework \App \CacheInterface ;
13
13
14
14
/**
15
- * Dynamic validator for UI admin analytics notification, manage UI component visibility.
15
+ * Dynamic validator for UI admin analytics notification, control UI component visibility.
16
16
*/
17
17
class CanViewNotification implements VisibilityConditionInterface
18
18
{
@@ -41,7 +41,7 @@ class CanViewNotification implements VisibilityConditionInterface
41
41
private $ cacheStorage ;
42
42
43
43
/**
44
- * @param Logger $viewerLogger
44
+ * @param Logger $viewerLogger
45
45
* @param CacheInterface $cacheStorage
46
46
*/
47
47
public function __construct (
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ public function __construct(
51
51
* @param string $lastViewVersion
52
52
* @return bool
53
53
*/
54
- public function log (string $ lastViewVersion ) : bool
54
+ public function log (string $ lastViewVersion ): bool
55
55
{
56
56
/** @var \Magento\Framework\DB\Adapter\AdapterInterface $connection */
57
57
$ connection = $ this ->resource ->getConnection (ResourceConnection::DEFAULT_CONNECTION );
@@ -72,7 +72,7 @@ public function log(string $lastViewVersion) : bool
72
72
*
73
73
* @return Log
74
74
*/
75
- public function get () : Log
75
+ public function get (): Log
76
76
{
77
77
return $ this ->logFactory ->create (['data ' => $ this ->loadLatestLogData ()]);
78
78
}
@@ -82,7 +82,7 @@ public function get() : Log
82
82
*
83
83
* @return boolean
84
84
*/
85
- public function checkLogExists () : bool
85
+ public function checkLogExists (): bool
86
86
{
87
87
$ data = $ this ->logFactory ->create (['data ' => $ this ->loadLatestLogData ()]);
88
88
$ lastViewedVersion = $ data ->getLastViewVersion ();
@@ -94,7 +94,7 @@ public function checkLogExists() : bool
94
94
*
95
95
* @return array
96
96
*/
97
- private function loadLatestLogData () : array
97
+ private function loadLatestLogData (): array
98
98
{
99
99
$ connection = $ this ->resource ->getConnection ();
100
100
$ select = $ connection ->select ()
Original file line number Diff line number Diff line change 1
- The purpose of Magento\AdminAnalytics module is gather information on which features the users uses and sends it to adobe analytics
1
+ The purpose of Magento\AdminAnalytics module is to gather information on which features the admins use, to help improve Magento admin experience.
Original file line number Diff line number Diff line change 9
9
<sections xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
10
10
xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Page/etc/SectionObject.xsd" >
11
11
<section name =" AdminUsageConfigSection" >
12
-
13
12
<element name =" adminUsageHeader" type =" text" selector =" #admin_usage-head" />
14
13
<element name =" adminUsageOptions" type =" select" selector =" #admin_usage_enabled" />
15
14
</section >
You can’t perform that action at this time.
0 commit comments