You are here

NumberFormatDefinitionEvent.php in Price 2.x

Namespace

Drupal\price\Event

File

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

namespace Drupal\price\Event;

use Drupal\price\EventBase;

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

  /**
   * 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.