You are here

protected function AddressFormatRepository::processDefinition in Address 8

File

src/Repository/AddressFormatRepository.php, line 38

Class

AddressFormatRepository
Provides address formats.

Namespace

Drupal\address\Repository

Code

protected function processDefinition($countryCode, array $definition) {
  $definition = parent::processDefinition($countryCode, $definition);

  // Allow other modules to alter the address format.
  $event = new AddressFormatEvent($definition);
  $this->eventDispatcher
    ->dispatch(AddressEvents::ADDRESS_FORMAT, $event);
  $definition = $event
    ->getDefinition();
  return $definition;
}