Example #1
0
 /**
  * {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);
 }
Example #2
0
 /**
  * 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());
 }
Example #3
0
 /**
  * {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());
 }