public function ShippingMethod::setWeight in Commerce Shipping 8.2
Sets the shipping method weight.
Parameters
int $weight: The shipping method weight.
Return value
$this
Overrides ShippingMethodInterface::setWeight
File
- src/
Entity/ ShippingMethod.php, line 201
Class
- ShippingMethod
- Defines the shipping method entity class.
Namespace
Drupal\commerce_shipping\EntityCode
public function setWeight($weight) {
$this
->set('weight', $weight);
return $this;
}