Пример #1
0
 /**
  * Gets the postal code label for the given type.
  *
  * @param string $postal_code_type
  *   The postal code type.
  *
  * @return string
  *   The postal code label.
  */
 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];
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function setPostalCodeType($postalCodeType)
 {
     PostalCodeType::assertExists($postalCodeType);
     $this->postalCodeType = $postalCodeType;
     return $this;
 }