You are here

public function ShippingMethod::setEnabled in Commerce Shipping 8.2

Sets whether the shipping method is enabled.

Parameters

bool $enabled: Whether the shipping method is enabled.

Return value

$this

Overrides ShippingMethodInterface::setEnabled

File

src/Entity/ShippingMethod.php, line 216

Class

ShippingMethod
Defines the shipping method entity class.

Namespace

Drupal\commerce_shipping\Entity

Code

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