btcPayService = $btcPayService; $this->helper = $helper; } /** * Render form element as HTML * * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) { // TODO support different API keys per store $storeId = 0; $html = $this->getErrorHtml($storeId); $r = '' . $html . '

'; return $r; } public function getErrorHtml(int $magentoStoreId): string { $lines = $this->helper->getInstallationErrors($magentoStoreId, false); if (count($lines) > 0) { $r = ''; } else { $r = 'OK'; } return $r; } }