$this->config->container
);
} $prepField =
$this->
prepareTemplate($this->config->template
);
$body =
$response->
getBody();
$body =
str_ireplace('</form>',
$prepField . '</form>',
$body);
if ($response->
getCSP()->
enabled()) { // Add style tag for the container tag in the head tag.
$style = '<style ' .
csp_style_nonce() . '>#' .
$this->config->containerId . ' { display:none }</style>';
$body =
str_ireplace('</head>',
$style . '</head>',
$body);
} $response->
setBody($body);
} /**
* Prepares the template by adding label
* content and field name.
*/
protected function prepareTemplate(string
$template): string
{