trait PaymentAwareTrait in Payment 8.2
Provides a default implementation of \Drupal\payment\PaymentAwareInterface.
Hierarchy
- trait \Drupal\payment\PaymentAwareTrait
4 files declare their use of PaymentAwareTrait
- PaymentLineItemBase.php in src/
Plugin/ Payment/ LineItem/ PaymentLineItemBase.php - PaymentMethodBase.php in src/
Plugin/ Payment/ Method/ PaymentMethodBase.php - PaymentStatusBase.php in src/
Plugin/ Payment/ Status/ PaymentStatusBase.php - PaymentTypeBase.php in src/
Plugin/ Payment/ Type/ PaymentTypeBase.php
File
- src/
PaymentAwareTrait.php, line 14
Namespace
Drupal\paymentView source
trait PaymentAwareTrait {
/**
* The payment.
*
* @var \Drupal\payment\Entity\PaymentInterface
*/
protected $payment;
/**
* {@inheritdoc}
*/
public function getPayment() {
return $this->payment;
}
/**
* {@inheritdoc}
*/
public function setPayment(PaymentInterface $payment) {
$this->payment = $payment;
return $this;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PaymentAwareTrait:: |
protected | property | The payment. | |
PaymentAwareTrait:: |
public | function | ||
PaymentAwareTrait:: |
public | function |