commerce_shipping-8.x-2.0-rc2/src/Event/ShipmentEvent.php

src/Event/ShipmentEvent.php
<?php

namespace Drupal\commerce_shipping\Event;

use Drupal\commerce\EventBase;
use Drupal\commerce_shipping\Entity\ShipmentInterface;

/**
 * Defines the shipment event.
 *
 * @see \Drupal\commerce_shipping\Event\ShippingEvents
 */
class ShipmentEvent extends EventBase {

  /**
   * The shipment.
   *
   * @var \Drupal\commerce_shipping\Entity\ShipmentInterface
   */
  protected $shipment;

  /**
   * Constructs a new ShipmentEvent.
   *
   * @param \Drupal\commerce_shipping\Entity\ShipmentInterface $shipment
   *   The shipment.
   */
  public function __construct(ShipmentInterface $shipment) {
    $this->shipment = $shipment;
  }

  /**
   * Gets the shipment.
   *
   * @return \Drupal\commerce_shipping\Entity\ShipmentInterface
   *   Gets the shipment.
   */
  public function getShipment() {
    return $this->shipment;
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc