You are here

class AddressFormatEvent in Address 8

Defines the address format event.

Hierarchy

  • class \Drupal\address\Event\AddressFormatEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of AddressFormatEvent

See also

\Drupal\address\Event\AddressEvents

\CommerceGuys\Addressing\AddressFormat\AddressFormat

2 files declare their use of AddressFormatEvent
AddressFormatRepository.php in src/Repository/AddressFormatRepository.php
GreatBritainEventSubscriber.php in tests/modules/address_test/src/EventSubscriber/GreatBritainEventSubscriber.php

File

src/Event/AddressFormatEvent.php, line 13

Namespace

Drupal\address\Event
View source
class AddressFormatEvent extends Event {

  /**
   * The address format definition.
   *
   * @var array
   */
  protected $definition;

  /**
   * Constructs a new AddressFormatEvent object.
   *
   * @param array $definition
   *   The address format definition.
   */
  public function __construct(array $definition) {
    $this->definition = $definition;
  }

  /**
   * Gets the address format definition.
   *
   * @return array
   *   The address format definition.
   */
  public function getDefinition() {
    return $this->definition;
  }

  /**
   * Sets the address format definition.
   *
   * @param array $definition
   *   The address format definition.
   *
   * @return $this
   */
  public function setDefinition(array $definition) {
    $this->definition = $definition;
    return $this;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AddressFormatEvent::$definition protected property The address format definition.
AddressFormatEvent::getDefinition public function Gets the address format definition.
AddressFormatEvent::setDefinition public function Sets the address format definition.
AddressFormatEvent::__construct public function Constructs a new AddressFormatEvent object.