Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-new-relic-reporting
Model
Observer
CheckConfig.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\NewRelicReporting\Model\Observer
;
7
8
use
Magento\Framework\Event\Observer
;
9
use
Magento\Framework\Event\ObserverInterface
;
10
use
Magento\NewRelicReporting\Model\Config
;
11
use
Magento\Framework\Message\ManagerInterface
;
12
use
Magento\NewRelicReporting\Model\NewRelicWrapper
;
13
17
class
CheckConfig
implements
ObserverInterface
18
{
22
protected
$config
;
23
27
protected
$newRelicWrapper
;
28
32
protected
$messageManager
;
33
39
public
function
__construct
(
40
Config
$config
,
41
NewRelicWrapper
$newRelicWrapper
,
42
ManagerInterface
$messageManager
43
) {
44
$this->config =
$config
;
45
$this->newRelicWrapper =
$newRelicWrapper
;
46
$this->messageManager =
$messageManager
;
47
}
48
56
public
function
execute
(
Observer
$observer
)
57
{
58
if
($this->config->isNewRelicEnabled()) {
59
if
(!$this->newRelicWrapper->isExtensionInstalled()) {
60
$this->config->disableModule();
61
$this->messageManager->addError(
62
__
(
63
'The New Relic integration requires the newrelic-php5 agent, which is not installed. More
64
information on installing the agent is available <a target="_blank" href="%1">here</a>.'
,
65
'https://docs.newrelic.com/docs/agents/php-agent/installation/php-agent-installation-overview'
66
),
67
$this->messageManager->getDefaultGroup()
68
);
69
}
70
}
71
}
72
}
Magento\NewRelicReporting\Model\NewRelicWrapper
Definition:
NewRelicWrapper.php:13
Magento\Framework\Event\ObserverInterface
Definition:
ObserverInterface.php:16
__
__()
Definition:
__.php:13
$observer
$observer
Definition:
second_website_with_second_currency.php:38
Magento\NewRelicReporting\Model\Observer\CheckConfig\$messageManager
$messageManager
Definition:
CheckConfig.php:32
Magento\Framework\Message\ManagerInterface
Definition:
ManagerInterface.php:14
Magento\Framework\Event\Observer
Definition:
Collection.php:12
Magento\NewRelicReporting\Model\Observer\CheckConfig\$config
$config
Definition:
CheckConfig.php:22
Magento\NewRelicReporting\Model\Config
Definition:
Config.php:11
Magento\NewRelicReporting\Model\Observer
Definition:
CheckConfig.php:6
Magento\NewRelicReporting\Model\Observer\CheckConfig
Definition:
CheckConfig.php:17
Magento\NewRelicReporting\Model\Observer\CheckConfig\__construct
__construct(Config $config, NewRelicWrapper $newRelicWrapper, ManagerInterface $messageManager)
Definition:
CheckConfig.php:39
Magento\Framework\Event\Observer
Definition:
Observer.php:14
Magento\NewRelicReporting\Model\Observer\CheckConfig\execute
execute(Observer $observer)
Definition:
CheckConfig.php:56
Magento\NewRelicReporting\Model\Observer\CheckConfig\$newRelicWrapper
$newRelicWrapper
Definition:
CheckConfig.php:27