interface LineItemCollectionInterface in Payment 8.2
Defines a line item collection.
Hierarchy
- interface \Drupal\payment\LineItemCollectionInterface
Expanded class hierarchy of LineItemCollectionInterface
All classes that implement LineItemCollectionInterface
4 files declare their use of LineItemCollectionInterface
- PaymentInterface.php in src/
Entity/ PaymentInterface.php - PaymentLineItemOverview.php in src/
Plugin/ Field/ FieldFormatter/ PaymentLineItemOverview.php - PaymentLineItemsDisplay.php in src/
Element/ PaymentLineItemsDisplay.php - PaymentLineItemsDisplayTest.php in tests/
src/ Unit/ Element/ PaymentLineItemsDisplayTest.php
File
- src/
LineItemCollectionInterface.php, line 10
Namespace
Drupal\paymentView source
interface LineItemCollectionInterface {
/**
* Sets the line items' ISO 4217 currency code.
*
* @param string $currency_code
*
* @return static
*/
public function setCurrencyCode($currency_code);
/**
* Gets the line items' ISO 4217 currency code.
*
* @return string
*/
public function getCurrencyCode();
/**
* Sets line items.
*
* @param \Drupal\payment\Plugin\Payment\LineItem\PaymentLineItemInterface[] $line_items
*
* @return static
*/
public function setLineItems(array $line_items);
/**
* Sets a line item.
*
* @param \Drupal\payment\Plugin\Payment\LineItem\PaymentLineItemInterface $line_item
*
* @return static
*/
public function setLineItem(PaymentLineItemInterface $line_item);
/**
* Unsets a line item.
*
* @param string $name
* The line item's name.
*
* @return static
*/
public function unsetLineItem($name);
/**
* Gets all line items.
*
* @return \Drupal\payment\Plugin\Payment\LineItem\PaymentLineItemInterface[]
*/
public function getLineItems();
/**
* Gets a line item.
*
* @param string $name
* The line item's machine name.
*
* @return \Drupal\payment\Plugin\Payment\LineItem\PaymentLineItemInterface
*/
public function getLineItem($name);
/**
* Gets line items by plugin type.
*
* @param string $plugin_id
* The line item plugin's ID.
*
* @return \Drupal\payment\Plugin\Payment\LineItem\PaymentLineItemInterface[]
*/
public function getLineItemsByType($plugin_id);
/**
* Gets the line items' total amount.
*
* @return float|int|string
* A numeric value.
*/
public function getAmount();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LineItemCollectionInterface:: |
public | function | Gets the line items' total amount. | 2 |
LineItemCollectionInterface:: |
public | function | Gets the line items' ISO 4217 currency code. | 2 |
LineItemCollectionInterface:: |
public | function | Gets a line item. | 2 |
LineItemCollectionInterface:: |
public | function | Gets all line items. | 2 |
LineItemCollectionInterface:: |
public | function | Gets line items by plugin type. | 2 |
LineItemCollectionInterface:: |
public | function | Sets the line items' ISO 4217 currency code. | 2 |
LineItemCollectionInterface:: |
public | function | Sets a line item. | 2 |
LineItemCollectionInterface:: |
public | function | Sets line items. | 2 |
LineItemCollectionInterface:: |
public | function | Unsets a line item. | 2 |