integrationConfig = $integrationConfig; $this->consolidatedConfig = $consolidatedConfig; $this->urlBuilder = $urlBuilder; $this->integrationService = $integrationService; } /** * Check whether all indices are valid or not * * @return bool */ public function isDisplayed() { foreach (array_keys($this->consolidatedConfig->getIntegrations()) as $name) { $integration = $this->integrationService->findByName($name); if ($integration->getStatus() == Integration::STATUS_RECREATED) { return true; } } return false; } //@codeCoverageIgnoreStart /** * Retrieve unique message identity * * @return string */ public function getIdentity() { return md5('INTEGRATION_RECREATED'); } /** * Retrieve message text * * @return \Magento\Framework\Phrase */ public function getText() { $url = $this->urlBuilder->getUrl('adminhtml/integration'); return __( 'One or more integrations have been reset because of a change to their xml configs.', $url ); } /** * Retrieve message severity * * @return int */ public function getSeverity() { return self::SEVERITY_MAJOR; } //@codeCoverageIgnoreEnd }