You are here

interface ParentEntityAwareInterface in Commerce Core 8.2

Defines the interface for conditions that depend on the parent entity.

For example, an order condition needing access to the parent promotion.

Hierarchy

Expanded class hierarchy of ParentEntityAwareInterface

All classes that implement ParentEntityAwareInterface

See also

\Drupal\commerce\Plugin\Commerce\Condition\ParentEntityAwareTrait

3 files declare their use of ParentEntityAwareInterface
OrderItemQuantity.php in modules/promotion/src/Plugin/Commerce/Condition/OrderItemQuantity.php
PaymentGateway.php in modules/payment/src/Entity/PaymentGateway.php
Promotion.php in modules/promotion/src/Entity/Promotion.php

File

src/Plugin/Commerce/Condition/ParentEntityAwareInterface.php, line 14

Namespace

Drupal\commerce\Plugin\Commerce\Condition
View source
interface ParentEntityAwareInterface {

  /**
   * Sets the parent entity.
   *
   * @param \Drupal\Core\Entity\EntityInterface $parent_entity
   *   The parent entity.
   *
   * @return $this
   */
  public function setParentEntity(EntityInterface $parent_entity);

}

Members