You are here

public function Promotion::setOrderTypes in Commerce Core 8.2

Sets the promotion order types.

Parameters

\Drupal\commerce_order\Entity\OrderTypeInterface[] $order_types: The promotion order types.

Return value

$this

Overrides PromotionInterface::setOrderTypes

File

modules/promotion/src/Entity/Promotion.php, line 190

Class

Promotion
Defines the promotion entity class.

Namespace

Drupal\commerce_promotion\Entity

Code

public function setOrderTypes(array $order_types) {
  $this
    ->set('order_types', $order_types);
  return $this;
}