Skip to content

Commit

Permalink
7241 Undo creation of constants due to @api reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
avstudnitz committed Dec 1, 2017
1 parent 519b805 commit eb79b38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
10 changes: 3 additions & 7 deletions app/code/Magento/Config/Model/Config/Source/Nooptreq.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,15 @@
*/
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' => self::VALUE_NO, 'label' => __('No')],
['value' => self::VALUE_OPTIONAL, 'label' => __('Optional')],
['value' => self::VALUE_REQUIRED, 'label' => __('Required')]
['value' => '', 'label' => __('No')],
['value' => 'opt', 'label' => __('Optional')],
['value' => 'req', 'label' => __('Required')]
];
}
}
4 changes: 2 additions & 2 deletions app/code/Magento/Customer/Model/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function getNamePrefixOptions($store = null)
{
return $this->prepareNamePrefixSuffixOptions(
$this->addressHelper->getConfig('prefix_options', $store),
$this->addressHelper->getConfig('prefix_show', $store) == NooptreqSource::VALUE_OPTIONAL
$this->addressHelper->getConfig('prefix_show', $store) == 'opt'
);
}

Expand All @@ -59,7 +59,7 @@ public function getNameSuffixOptions($store = null)
{
return $this->prepareNamePrefixSuffixOptions(
$this->addressHelper->getConfig('suffix_options', $store),
$this->addressHelper->getConfig('suffix_show', $store) == NooptreqSource::VALUE_OPTIONAL
$this->addressHelper->getConfig('suffix_show', $store) == 'opt'
);
}

Expand Down

0 comments on commit eb79b38

Please sign in to comment.