You are here

trait PaymentAwareTrait in Payment 8.2

Provides a default implementation of \Drupal\payment\PaymentAwareInterface.

Hierarchy

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\payment
View 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