File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Config/Model/Config/Source Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1111 */
1212class Nooptreq implements \Magento \Framework \Option \ArrayInterface
1313{
14+ const VALUE_NO = '' ;
15+ const VALUE_OPTIONAL = 'opt ' ;
16+ const VALUE_REQUIRED = 'req ' ;
17+
1418 /**
1519 * @return array
1620 */
1721 public function toOptionArray ()
1822 {
1923 return [
20- ['value ' => '' , 'label ' => __ ('No ' )],
21- ['value ' => ' opt ' , 'label ' => __ ('Optional ' )],
22- ['value ' => ' req ' , 'label ' => __ ('Required ' )]
24+ ['value ' => self :: VALUE_NO , 'label ' => __ ('No ' )],
25+ ['value ' => self :: VALUE_OPTIONAL , 'label ' => __ ('Optional ' )],
26+ ['value ' => self :: VALUE_REQUIRED , 'label ' => __ ('Required ' )]
2327 ];
2428 }
2529}
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public function getNamePrefixOptions($store = null)
4545 {
4646 return $ this ->prepareNamePrefixSuffixOptions (
4747 $ this ->addressHelper ->getConfig ('prefix_options ' , $ store ),
48- $ this ->addressHelper ->getConfig ('prefix_show ' , $ store ) == ' opt '
48+ $ this ->addressHelper ->getConfig ('prefix_show ' , $ store ) == NooptreqSource:: VALUE_OPTIONAL
4949 );
5050 }
5151
@@ -59,7 +59,7 @@ public function getNameSuffixOptions($store = null)
5959 {
6060 return $ this ->prepareNamePrefixSuffixOptions (
6161 $ this ->addressHelper ->getConfig ('suffix_options ' , $ store ),
62- $ this ->addressHelper ->getConfig ('suffix_show ' , $ store ) == ' opt '
62+ $ this ->addressHelper ->getConfig ('suffix_show ' , $ store ) == NooptreqSource:: VALUE_OPTIONAL
6363 );
6464 }
6565
You can’t perform that action at this time.
0 commit comments