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