You are here

public static function LabelHelper::getGenericFieldLabels in Address 8

Gets the generic field labels.

Intended primarily for backend settings screens.

Return value

string[] The field labels, keyed by field.

1 call to LabelHelper::getGenericFieldLabels()
AddressItem::fieldSettingsForm in src/Plugin/Field/FieldType/AddressItem.php
Returns a form for the field-level settings.

File

src/LabelHelper.php, line 25

Class

LabelHelper
Provides translated labels for the library enums.

Namespace

Drupal\address

Code

public static function getGenericFieldLabels() {
  return [
    AddressField::GIVEN_NAME => t('First name', [], [
      'context' => 'Address label',
    ]),
    AddressField::ADDITIONAL_NAME => t('Middle name', [], [
      'context' => 'Address label',
    ]),
    AddressField::FAMILY_NAME => t('Last name', [], [
      'context' => 'Address label',
    ]),
    AddressField::ORGANIZATION => t('Company', [], [
      'context' => 'Address label',
    ]),
    AddressField::ADDRESS_LINE1 => t('Address line 1', [], [
      'context' => 'Address label',
    ]),
    AddressField::ADDRESS_LINE2 => t('Address line 2', [], [
      'context' => 'Address label',
    ]),
    AddressField::POSTAL_CODE => t('Postal code', [], [
      'context' => 'Address label',
    ]),
    AddressField::SORTING_CODE => t('Sorting code', [], [
      'context' => 'Address label',
    ]),
    AddressField::DEPENDENT_LOCALITY => t('Dependent locality (e.g. Neighbourhood)', [], [
      'context' => 'Address label',
    ]),
    AddressField::LOCALITY => t('Locality (e.g. City)', [], [
      'context' => 'Address label',
    ]),
    AddressField::ADMINISTRATIVE_AREA => t('Administrative area (e.g. State or Province)', [], [
      'context' => 'Address label',
    ]),
  ];
}