You are here

public function Promotion::setEnabled in Commerce Core 8.2

Sets whether the promotion is enabled.

Parameters

bool $enabled: Whether the promotion is enabled.

Return value

$this

Overrides PromotionInterface::setEnabled

File

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

Class

Promotion
Defines the promotion entity class.

Namespace

Drupal\commerce_promotion\Entity

Code

public function setEnabled($enabled) {
  $this
    ->set('status', (bool) $enabled);
  return $this;
}