escaper = $escaper; foreach ($this->methodCodes as $code) { $this->methods[$code] = $paymentHelper->getMethodInstance($code); } } /** * {@inheritdoc} */ public function getConfig() { $config = []; foreach ($this->methodCodes as $code) { if ($this->methods[$code]->isAvailable()) { $config['payment']['instructions'][$code] = $this->getInstructions($code); } } return $config; } /** * Get instructions text from config * * @param string $code * @return string */ protected function getInstructions($code) { return nl2br($this->escaper->escapeHtml($this->methods[$code]->getInstructions())); } }