You are here

NumberFormatDefinitionEvent.php in Price 3.x

Namespace

Drupal\price\Event

File

src/Event/NumberFormatDefinitionEvent.php
View source
<?php

namespace Drupal\price\Event;

use Symfony\Component\EventDispatcher\Event;

/**
 * Defines the number format definition event.
 *
 * @see \Drupal\price\Event\PriceEvents
 */
class NumberFormatDefinitionEvent extends Event {

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

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

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

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

}

Classes

Namesort descending Description
NumberFormatDefinitionEvent Defines the number format definition event.