File tree 2 files changed +9
-5
lines changed
Config/Model/Config/Source
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 11
11
*/
12
12
class Nooptreq implements \Magento \Framework \Option \ArrayInterface
13
13
{
14
+ const VALUE_NO = '' ;
15
+ const VALUE_OPTIONAL = 'opt ' ;
16
+ const VALUE_REQUIRED = 'req ' ;
17
+
14
18
/**
15
19
* @return array
16
20
*/
17
21
public function toOptionArray ()
18
22
{
19
23
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 ' )]
23
27
];
24
28
}
25
29
}
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public function getNamePrefixOptions($store = null)
45
45
{
46
46
return $ this ->prepareNamePrefixSuffixOptions (
47
47
$ this ->addressHelper ->getConfig ('prefix_options ' , $ store ),
48
- $ this ->addressHelper ->getConfig ('prefix_show ' , $ store ) == ' opt '
48
+ $ this ->addressHelper ->getConfig ('prefix_show ' , $ store ) == NooptreqSource:: VALUE_OPTIONAL
49
49
);
50
50
}
51
51
@@ -59,7 +59,7 @@ public function getNameSuffixOptions($store = null)
59
59
{
60
60
return $ this ->prepareNamePrefixSuffixOptions (
61
61
$ this ->addressHelper ->getConfig ('suffix_options ' , $ store ),
62
- $ this ->addressHelper ->getConfig ('suffix_show ' , $ store ) == ' opt '
62
+ $ this ->addressHelper ->getConfig ('suffix_show ' , $ store ) == NooptreqSource:: VALUE_OPTIONAL
63
63
);
64
64
}
65
65
You can’t perform that action at this time.
0 commit comments