config = $config; $this->newRelicWrapper = $newRelicWrapper; $this->messageManager = $messageManager; } /** * Update items stock status and low stock date. * * @param Observer $observer * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function execute(Observer $observer) { if ($this->config->isNewRelicEnabled()) { if (!$this->newRelicWrapper->isExtensionInstalled()) { $this->config->disableModule(); $this->messageManager->addError( __( 'The New Relic integration requires the newrelic-php5 agent, which is not installed. More information on installing the agent is available here.', 'https://docs.newrelic.com/docs/agents/php-agent/installation/php-agent-installation-overview' ), $this->messageManager->getDefaultGroup() ); } } } }