You are here

public function Promotion::setUsageLimit in Commerce Core 8.2

Sets the promotion usage limit.

Parameters

int $usage_limit: The promotion usage limit.

Return value

$this

Overrides PromotionInterface::setUsageLimit

File

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

Class

Promotion
Defines the promotion entity class.

Namespace

Drupal\commerce_promotion\Entity

Code

public function setUsageLimit($usage_limit) {
  $this
    ->set('usage_limit', $usage_limit);
  return $this;
}