/** * {inheritdoc} */ public function getConfigData($field, $storeId = null) { if ($storeId === null) { return $this->getConfiguredValue($field); } $handler = $this->valueHandlerPool->get($field); return $handler->handle($field, (int) $storeId); }
/** * Unifies configured value handling logic * * @param string $field * @param null $storeId * @return mixed */ private function getConfiguredValue($field, $storeId = null) { $handler = $this->valueHandlerPool->get($field); $subject = ['field' => $field]; if ($this->getInfoInstance()) { $subject['payment'] = $this->paymentDataObjectFactory->create($this->getInfoInstance()); } return $handler->handle($subject, $storeId ?: $this->getStore()); }
/** * {inheritdoc} */ public function getConfigData($field, $storeId = null) { if ($storeId === null) { return $this->getConfiguredValue($field); } $subject = ['field' => $field]; if ($this->getInfoInstance()) { $subject['payment'] = $this->paymentDataObjectFactory->create($this->getInfoInstance()); } $handler = $this->valueHandlerPool->get($field); return $handler->handle($subject, (int) $storeId); }
/** * Unifies configured value handling logic * * @param string $field * @param null $storeId * @return mixed */ private function getConfiguredValue($field, $storeId = null) { $handler = $this->valueHandlerPool->get($field); $subject = ['field' => $field]; return $handler->handle($subject, $storeId ?: $this->getStore()); }