interface PaymentLineItemInterface in Payment 8.2
A payment line item.
Plugins can additionally implement the following interfaces:
- \Drupal\Component\Plugin\ConfigurableInterface Required if the plugin has any internal configuration, so it can be exported for recreation of the plugin at a later time.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Core\Plugin\PluginFormInterface; interface \Drupal\payment\PaymentAwareInterface
- interface \Drupal\payment\Plugin\Payment\LineItem\PaymentLineItemInterface
Expanded class hierarchy of PaymentLineItemInterface
All classes that implement PaymentLineItemInterface
10 files declare their use of PaymentLineItemInterface
- LineItemCollection.php in src/
LineItemCollection.php - LineItemCollectionInterface.php in src/
LineItemCollectionInterface.php - LineItemCollectionTest.php in tests/
src/ Unit/ LineItemCollectionTest.php - Payment.php in src/
Entity/ Payment.php - PaymentFactoryTest.php in modules/
payment_reference/ tests/ src/ Unit/ PaymentFactoryTest.php
File
- src/
Plugin/ Payment/ LineItem/ PaymentLineItemInterface.php, line 21
Namespace
Drupal\payment\Plugin\Payment\LineItemView source
interface PaymentLineItemInterface extends PluginInspectionInterface, PluginFormInterface, PaymentAwareInterface {
/**
* Gets the amount.
*
* @return float|int|string
* A numeric value.
*/
public function getAmount();
/**
* Return this line item's total amount.
*
* @return float
*/
function getTotalAmount();
/**
* Sets the machine name.
*
* @param string $name
*
* @return static
*/
public function setName($name);
/**
* Gets the machine name.
*
* @return string
*/
public function getName();
/**
* Gets the line item description.
*
* @return string
*/
public function getDescription();
/**
* Gets the currency_code.
*
* @return string
*/
public function getCurrencyCode();
/**
* Sets the quantity.
*
* @param int|float $quantity
*
* @return static
*/
public function setQuantity($quantity);
/**
* Gets the quantity.
*
* @return int|float
*/
public function getQuantity();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PaymentAwareInterface:: |
public | function | Gets the payment. | 1 |
PaymentAwareInterface:: |
public | function | Sets the payment. | 1 |
PaymentLineItemInterface:: |
public | function | Gets the amount. | 1 |
PaymentLineItemInterface:: |
public | function | Gets the currency_code. | 1 |
PaymentLineItemInterface:: |
public | function | Gets the line item description. | 1 |
PaymentLineItemInterface:: |
public | function | Gets the machine name. | 1 |
PaymentLineItemInterface:: |
public | function | Gets the quantity. | 1 |
PaymentLineItemInterface:: |
function | Return this line item's total amount. | 1 | |
PaymentLineItemInterface:: |
public | function | Sets the machine name. | 1 |
PaymentLineItemInterface:: |
public | function | Sets the quantity. | 1 |
PluginFormInterface:: |
public | function | Form constructor. | 36 |
PluginFormInterface:: |
public | function | Form submission handler. | 32 |
PluginFormInterface:: |
public | function | Form validation handler. | 18 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |