You are here

public function PackageType::setWeight in Commerce Shipping 8.2

Sets the package type weight.

Parameters

array $weight: An array with the following keys: number, unit.

Return value

$this

Overrides PackageTypeInterface::setWeight

File

src/Entity/PackageType.php, line 111

Class

PackageType
Defines the package type entity class.

Namespace

Drupal\commerce_shipping\Entity

Code

public function setWeight(array $weight) {
  $this->weight = $weight;
  return $this;
}