final class ShippingService in Commerce Shipping 8.2
Represents a shipping service.
Hierarchy
- class \Drupal\commerce_shipping\ShippingService
Expanded class hierarchy of ShippingService
5 files declare their use of ShippingService
- FlatRate.php in src/
Plugin/ Commerce/ ShippingMethod/ FlatRate.php - PromotionSubscriberTest.php in tests/
src/ Kernel/ EventSubscriber/ PromotionSubscriberTest.php - ShippingMethodBase.php in src/
Plugin/ Commerce/ ShippingMethod/ ShippingMethodBase.php - ShippingRateTest.php in tests/
src/ Unit/ ShippingRateTest.php - ShippingServiceTest.php in tests/
src/ Unit/ ShippingServiceTest.php
File
- src/
ShippingService.php, line 8
Namespace
Drupal\commerce_shippingView source
final class ShippingService {
/**
* The shipping service ID.
*
* @var string
*/
protected $id;
/**
* The shipping service label.
*
* @var string
*/
protected $label;
/**
* Constructs a new ShippingService instance.
*
* @param string $id
* The shipping service ID.
* @param string $label
* The shipping service label.
*/
public function __construct($id, $label) {
$this->id = $id;
$this->label = $label;
}
/**
* Gets the shipping service ID.
*
* @return string
* The shipping service ID.
*/
public function getId() : string {
return $this->id;
}
/**
* Gets the shipping service label.
*
* @return string
* The shipping service label.
*/
public function getLabel() : string {
return $this->label;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ShippingService:: |
protected | property | The shipping service ID. | |
ShippingService:: |
protected | property | The shipping service label. | |
ShippingService:: |
public | function | Gets the shipping service ID. | |
ShippingService:: |
public | function | Gets the shipping service label. | |
ShippingService:: |
public | function | Constructs a new ShippingService instance. |