public static function LabelHelper::getPostalCodeLabel in Address 8
Gets the postal code label for the given type.
Parameters
string $postal_code_type: The postal code type.
Return value
string The postal code label.
1 call to LabelHelper::getPostalCodeLabel()
- LabelHelper::getFieldLabels in src/
LabelHelper.php - Gets the field labels suitable for the given address format.
File
- src/
LabelHelper.php, line 198
Class
- LabelHelper
- Provides translated labels for the library enums.
Namespace
Drupal\addressCode
public static function getPostalCodeLabel($postal_code_type) {
if (!$postal_code_type) {
return NULL;
}
PostalCodeType::assertExists($postal_code_type);
$labels = self::getPostalCodeLabels();
return $labels[$postal_code_type];
}