/**
  * Gets the dependent locality label for the given type.
  *
  * @param string $dependent_locality_type
  *   The dependent locality type.
  *
  * @return string
  *   The dependent locality label.
  */
 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];
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 public function setDependentLocalityType($dependentLocalityType)
 {
     DependentLocalityType::assertExists($dependentLocalityType);
     $this->dependentLocalityType = $dependentLocalityType;
     return $this;
 }