Exemplo n.º 1
0
 /**
  * Gets the locality label for the given type.
  *
  * @param string $locality_type
  *   The locality type.
  *
  * @return string
  *   The locality label.
  */
 public static function getLocalityLabel($locality_type)
 {
     if (!$locality_type) {
         return NULL;
     }
     LocalityType::assertExists($locality_type);
     $labels = self::getLocalityLabels();
     return $labels[$locality_type];
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function setLocalityType($localityType)
 {
     LocalityType::assertExists($localityType);
     $this->localityType = $localityType;
     return $this;
 }