data = $data; $this->decoder = $decoder; $this->encoder = $encoder; $this->layoutSettings = $layoutSettings; } /** * Get public reCaptcha key * @return string */ public function getPublicKey() { return $this->config->getPublicKey(); } /** * @inheritdoc */ public function getJsLayout() { $layout = $this->decoder->decode(parent::getJsLayout()); $layout['components']['msp-recaptcha']['settings'] = $this->layoutSettings->getCaptchaSettings(); return $this->encoder->encode($layout); } }