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\EntityCode
public function setWeight(array $weight) {
$this->weight = $weight;
return $this;
}