You are here

public function LineItemCollection::__construct in Payment 8.2

Constructs a new instance.

Parameters

string $currency_code:

\Drupal\payment\Plugin\Payment\LineItem\PaymentLineItemInterface[] $line_items:

File

src/LineItemCollection.php, line 35

Class

LineItemCollection
Provides a line item collection.

Namespace

Drupal\payment

Code

public function __construct($currency_code = NULL, array $line_items = []) {
  $this->currencyCode = $currency_code;
  $this
    ->setLineItems($line_items);
}