8
8
9
9
use Magento \Directory \Helper \Data as DataHelper ;
10
10
use Magento \Customer \Helper \Address as AddressHelper ;
11
+ use Magento \Framework \Exception \NoSuchEntityException ;
11
12
use Magento \Framework \View \Element \Block \ArgumentInterface ;
12
13
13
14
/**
@@ -49,39 +50,49 @@ public function __construct(
49
50
}
50
51
51
52
/**
52
- * Returns data validation class
53
+ * Get string with frontend validation classes for attribute
53
54
*
54
- * @param mixed $param
55
- * @return mixed
55
+ * @param string $attributeCode
56
+ *
57
+ * @return string
58
+ *
59
+ * @throws \Magento\Framework\Exception\LocalizedException
56
60
*/
57
- public function dataGetAttributeValidationClass ($ param )
61
+ public function dataGetAttributeValidationClass ($ attributeCode )
58
62
{
59
- return $ this ->helperData ->getAttributeValidationClass ($ param );
63
+ return $ this ->helperData ->getAttributeValidationClass ($ attributeCode );
60
64
}
61
65
62
66
/**
63
- * Returns address validation class
67
+ * Get string with frontend validation classes for attribute
68
+ *
69
+ * @param string $attributeCode
64
70
*
65
- * @param mixed $param
66
- * @return mixed
71
+ * @return string
72
+ *
73
+ * @throws \Magento\Framework\Exception\LocalizedException
67
74
*/
68
- public function addressGetAttributeValidationClass ($ param )
75
+ public function addressGetAttributeValidationClass ($ attributeCode )
69
76
{
70
- return $ this ->helperAddress ->getAttributeValidationClass ($ param );
77
+ return $ this ->helperAddress ->getAttributeValidationClass ($ attributeCode );
71
78
}
72
79
73
80
/**
74
- * Returns street lines
81
+ * Return Number of Lines in a Street Address for store
82
+ *
83
+ * @param \Magento\Store\Model\Store|int|string $store
75
84
*
76
- * @return mixed
85
+ * @return int
86
+ * @throws NoSuchEntityException
87
+ * @throws \Magento\Framework\Exception\LocalizedException
77
88
*/
78
89
public function addressGetStreetLines ()
79
90
{
80
91
return $ this ->helperAddress ->getStreetLines ();
81
92
}
82
93
83
94
/**
84
- * Returns if VAT attribute is visible
95
+ * Check if VAT ID address attribute has to be shown on frontend (on Customer Address management forms)
85
96
*
86
97
* @return boolean
87
98
*/
@@ -91,22 +102,24 @@ public function addressIsVatAttributeVisible()
91
102
}
92
103
93
104
/**
94
- * Returns region JSON
105
+ * Retrieve regions data json
95
106
*
96
- * @return mixed
107
+ * @return string
108
+ * @throws NoSuchEntityException
97
109
*/
98
110
public function dataGetRegionJson ()
99
111
{
100
112
return $ this ->helperData ->getRegionJson ();
101
113
}
102
114
103
115
/**
104
- * Returns rcountries with optional zip
116
+ * Return ISO2 country codes, which have optional Zip/Postal pre-configured
105
117
*
106
- * @return mixed
118
+ * @param bool $asJson
119
+ * @return array|string
107
120
*/
108
- public function dataGetCountriesWithOptionalZip ()
121
+ public function dataGetCountriesWithOptionalZip ($ asJson )
109
122
{
110
- return $ this ->helperData ->getCountriesWithOptionalZip ();
123
+ return $ this ->helperData ->getCountriesWithOptionalZip ($ asJson );
111
124
}
112
125
}
0 commit comments