formKey = $formKey; $this->_isScopePrivate = true; $this->jsLayout = isset($data['jsLayout']) && is_array($data['jsLayout']) ? $data['jsLayout'] : []; $this->configProvider = $configProvider; $this->layoutProcessors = $layoutProcessors; $this->serializer = $serializerInterface ?: \Magento\Framework\App\ObjectManager::getInstance() ->get(\Magento\Framework\Serialize\Serializer\JsonHexTag::class); } /** * @inheritdoc */ public function getJsLayout() { foreach ($this->layoutProcessors as $processor) { $this->jsLayout = $processor->process($this->jsLayout); } return $this->serializer->serialize($this->jsLayout); } /** * Retrieve form key * * @return string * @codeCoverageIgnore */ public function getFormKey() { return $this->formKey->getFormKey(); } /** * Retrieve checkout configuration * * @return array * @codeCoverageIgnore */ public function getCheckoutConfig() { return $this->configProvider->getConfig(); } /** * Get base url for block. * * @return string * @codeCoverageIgnore */ public function getBaseUrl() { return $this->_storeManager->getStore()->getBaseUrl(); } /** * Retrieve serialized checkout config. * * @return bool|string * @since 100.2.0 */ public function getSerializedCheckoutConfig() { return $this->serializer->serialize($this->getCheckoutConfig()); } }