helper = $helper;
}
/**
* Render form element as HTML
*
* @param AbstractElement $element
* @return string
*/
public function render(AbstractElement $element)
{
$html = $this->getApiKeyInfo();
$r = '
|
|
' . $html . '
|
|
';
return $r;
}
private function getApiKeyInfo()
{
$isBaseUrlSet = $this->helper->isBtcPayBaseUrlSet();
if (!$isBaseUrlSet) {
return __('Save the BTCPay Base Url first.');
}
$html = '';
$apiKeyInfo = $this->helper->getApiKeyInfo('default', 0);
$html = $html . '
' . $apiKeyInfo['api_key'] . '
';
return $html;
}
}