You are here

protected function NumberFormatRepository::processDefinition in Price 8

Same name and namespace in other branches
  1. 3.x src/Repository/NumberFormatRepository.php \Drupal\price\Repository\NumberFormatRepository::processDefinition()
  2. 2.0.x src/Repository/NumberFormatRepository.php \Drupal\price\Repository\NumberFormatRepository::processDefinition()
  3. 2.x src/Repository/NumberFormatRepository.php \Drupal\price\Repository\NumberFormatRepository::processDefinition()
  4. 3.0.x src/Repository/NumberFormatRepository.php \Drupal\price\Repository\NumberFormatRepository::processDefinition()

File

src/Repository/NumberFormatRepository.php, line 41

Class

NumberFormatRepository
Defines the number format repository.

Namespace

Drupal\price\Repository

Code

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

  // Let the definition be altered.
  $event = new NumberFormatDefinitionEvent($definition);
  $this->eventDispatcher
    ->dispatch(PriceEvents::NUMBER_FORMAT, $event);
  $definition = $event
    ->getDefinition();
  return $definition;
}