PHP Класс Sonata\Component\Transformer\InvoiceTransformer

Автор: Hugo Briand ([email protected])
Наследование: extends BaseTransformer
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$deliveryPool Sonata\Component\Delivery\Pool
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$invoiceElementManager Sonata\Component\Invoice\InvoiceElementManagerInterface

Открытые методы

Метод Описание
__construct ( Sonata\Component\Invoice\InvoiceElementManagerInterface $invoiceElementManager, Pool $deliveryPool, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher ) Constructor.
transformFromOrder ( Sonata\Component\Order\OrderInterface $order, Sonata\Component\Invoice\InvoiceInterface $invoice ) Transforms an order into an invoice.

Защищенные методы

Метод Описание
addDelivery ( Sonata\Component\Invoice\InvoiceInterface $invoice, Sonata\Component\Order\OrderInterface $order ) Adds the delivery information from $order to $invoice.
createInvoiceElementFromOrderElement ( Sonata\Component\Order\OrderElementInterface $orderElement ) : Sonata\Component\Invoice\InvoiceElementInterface Creates an InvoiceElement based on an OrderElement.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( Sonata\Component\Invoice\InvoiceElementManagerInterface $invoiceElementManager, Pool $deliveryPool, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher )
$invoiceElementManager Sonata\Component\Invoice\InvoiceElementManagerInterface Invoice element manager
$deliveryPool Sonata\Component\Delivery\Pool Delivery pool component
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface

addDelivery() защищенный Метод

Adds the delivery information from $order to $invoice.
protected addDelivery ( Sonata\Component\Invoice\InvoiceInterface $invoice, Sonata\Component\Order\OrderInterface $order )
$invoice Sonata\Component\Invoice\InvoiceInterface
$order Sonata\Component\Order\OrderInterface

createInvoiceElementFromOrderElement() защищенный Метод

Creates an InvoiceElement based on an OrderElement.
protected createInvoiceElementFromOrderElement ( Sonata\Component\Order\OrderElementInterface $orderElement ) : Sonata\Component\Invoice\InvoiceElementInterface
$orderElement Sonata\Component\Order\OrderElementInterface
Результат Sonata\Component\Invoice\InvoiceElementInterface

transformFromOrder() публичный Метод

Transforms an order into an invoice.
public transformFromOrder ( Sonata\Component\Order\OrderInterface $order, Sonata\Component\Invoice\InvoiceInterface $invoice )
$order Sonata\Component\Order\OrderInterface
$invoice Sonata\Component\Invoice\InvoiceInterface

Описание свойств

$deliveryPool защищенное свойство

protected Pool,Sonata\Component\Delivery $deliveryPool
Результат Sonata\Component\Delivery\Pool

$eventDispatcher защищенное свойство

protected EventDispatcherInterface,Symfony\Component\EventDispatcher $eventDispatcher
Результат Symfony\Component\EventDispatcher\EventDispatcherInterface

$invoiceElementManager защищенное свойство

protected InvoiceElementManagerInterface,Sonata\Component\Invoice $invoiceElementManager
Результат Sonata\Component\Invoice\InvoiceElementManagerInterface