You are here

public static function LabelHelper::getDependentLocalityLabel in Address 8

Gets the dependent locality label for the given type.

Parameters

string $dependent_locality_type: The dependent locality type.

Return value

string The dependent locality label.

1 call to LabelHelper::getDependentLocalityLabel()
LabelHelper::getFieldLabels in src/LabelHelper.php
Gets the field labels suitable for the given address format.

File

src/LabelHelper.php, line 163

Class

LabelHelper
Provides translated labels for the library enums.

Namespace

Drupal\address

Code

public static function getDependentLocalityLabel($dependent_locality_type) {
  if (!$dependent_locality_type) {
    return NULL;
  }
  DependentLocalityType::assertExists($dependent_locality_type);
  $labels = self::getDependentLocalityLabels();
  return $labels[$dependent_locality_type];
}