Skip to content
Snippets Groups Projects
Commit fce3afe6 authored by Andreas von Studnitz's avatar Andreas von Studnitz
Browse files
parent eb79b38b
Branches
No related merge requests found
......@@ -11,15 +11,19 @@ namespace Magento\Config\Model\Config\Source;
*/
class Nooptreq implements \Magento\Framework\Option\ArrayInterface
{
const VALUE_NO = '';
const VALUE_OPTIONAL = 'opt';
const VALUE_REQUIRED = 'req';
/**
* @return array
*/
public function toOptionArray()
{
return [
['value' => '', 'label' => __('No')],
['value' => 'opt', 'label' => __('Optional')],
['value' => 'req', 'label' => __('Required')]
['value' => self::VALUE_NO, 'label' => __('No')],
['value' => self::VALUE_OPTIONAL, 'label' => __('Optional')],
['value' => self::VALUE_REQUIRED, 'label' => __('Required')]
];
}
}
......@@ -45,7 +45,7 @@ class Options
{
return $this->prepareNamePrefixSuffixOptions(
$this->addressHelper->getConfig('prefix_options', $store),
$this->addressHelper->getConfig('prefix_show', $store) == 'opt'
$this->addressHelper->getConfig('prefix_show', $store) == NooptreqSource::VALUE_OPTIONAL
);
}
......@@ -59,7 +59,7 @@ class Options
{
return $this->prepareNamePrefixSuffixOptions(
$this->addressHelper->getConfig('suffix_options', $store),
$this->addressHelper->getConfig('suffix_show', $store) == 'opt'
$this->addressHelper->getConfig('suffix_show', $store) == NooptreqSource::VALUE_OPTIONAL
);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment