You are here

public function Promotion::setCoupons in Commerce Core 8.2

Sets the coupons.

Parameters

\Drupal\commerce_promotion\Entity\CouponInterface[] $coupons: The coupons.

Return value

$this

Overrides PromotionInterface::setCoupons

File

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

Class

Promotion
Defines the promotion entity class.

Namespace

Drupal\commerce_promotion\Entity

Code

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