You are here

class CommercePromotionOffer in Commerce Core 8.2

Defines the promotion offer plugin annotation object.

Plugin namespace: Plugin\Commerce\PromotionOffer.

Hierarchy

Expanded class hierarchy of CommercePromotionOffer

6 classes are annotated with CommercePromotionOffer
BuyXGetY in modules/promotion/src/Plugin/Commerce/PromotionOffer/BuyXGetY.php
Provides the "Buy X Get Y" offer for orders.
CombinationOffer in modules/promotion/src/Plugin/Commerce/PromotionOffer/CombinationOffer.php
Provides the 'combination_offer' offer plugin.
OrderFixedAmountOff in modules/promotion/src/Plugin/Commerce/PromotionOffer/OrderFixedAmountOff.php
Provides the fixed amount off offer for orders.
OrderItemFixedAmountOff in modules/promotion/src/Plugin/Commerce/PromotionOffer/OrderItemFixedAmountOff.php
Provides the percentage off offer for order items.
OrderItemPercentageOff in modules/promotion/src/Plugin/Commerce/PromotionOffer/OrderItemPercentageOff.php
Provides the percentage off offer for order items.

... See full list

File

modules/promotion/src/Annotation/CommercePromotionOffer.php, line 14

Namespace

Drupal\commerce_promotion\Annotation
View source
class CommercePromotionOffer extends Plugin {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * The label of the plugin.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $label;

  /**
   * The offer entity type ID.
   *
   * This is the entity type ID of the entity passed to the plugin during execution.
   * For example: 'commerce_order'.
   *
   * @var string
   */
  public $entity_type;

}

Members

Namesort descending Modifiers Type Description Overrides
CommercePromotionOffer::$entity_type public property The offer entity type ID.
CommercePromotionOffer::$id public property The plugin ID.
CommercePromotionOffer::$label public property The label of the plugin.
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2