interface ShippingMethodInterface in Commerce Shipping 8.2
Same name in this branch
- 8.2 src/Entity/ShippingMethodInterface.php \Drupal\commerce_shipping\Entity\ShippingMethodInterface
- 8.2 src/Plugin/Commerce/ShippingMethod/ShippingMethodInterface.php \Drupal\commerce_shipping\Plugin\Commerce\ShippingMethod\ShippingMethodInterface
Defines the base interface for shipping methods.
Hierarchy
- interface \Drupal\Component\Plugin\ConfigurableInterface; interface \Drupal\Component\Plugin\DependentPluginInterface; interface \Drupal\Core\Plugin\PluginFormInterface; interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\commerce_shipping\Plugin\Commerce\ShippingMethod\ParentEntityAwareInterface
- interface \Drupal\commerce_shipping\Plugin\Commerce\ShippingMethod\ShippingMethodInterface
Expanded class hierarchy of ShippingMethodInterface
All classes that implement ShippingMethodInterface
File
- src/
Plugin/ Commerce/ ShippingMethod/ ShippingMethodInterface.php, line 15
Namespace
Drupal\commerce_shipping\Plugin\Commerce\ShippingMethodView source
interface ShippingMethodInterface extends ConfigurableInterface, DependentPluginInterface, PluginFormInterface, PluginInspectionInterface, ParentEntityAwareInterface {
/**
* Gets the shipping method label.
*
* @return mixed
* The shipping method label.
*/
public function getLabel();
/**
* Gets the default package type.
*
* @return \Drupal\commerce_shipping\Plugin\Commerce\PackageType\PackageTypeInterface
* The default package type.
*/
public function getDefaultPackageType();
/**
* Gets the shipping services.
*
* @return \Drupal\commerce_shipping\ShippingService[]
* The shipping services.
*/
public function getServices();
/**
* Gets the shipment workflow ID.
*
* @return string
* The shipment workflow ID.
*/
public function getWorkflowId();
/**
* Calculates rates for the given shipment.
*
* @param \Drupal\commerce_shipping\Entity\ShipmentInterface $shipment
* The shipment.
*
* @return \Drupal\commerce_shipping\ShippingRate[]
* The rates.
*/
public function calculateRates(ShipmentInterface $shipment);
/**
* Selects the given shipping rate for the given shipment.
*
* @param \Drupal\commerce_shipping\Entity\ShipmentInterface $shipment
* The shipment.
* @param \Drupal\commerce_shipping\ShippingRate $rate
* The shipping rate.
*/
public function selectRate(ShipmentInterface $shipment, ShippingRate $rate);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 11 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 12 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 12 |
DependentPluginInterface:: |
public | function | Calculates dependencies for the configured plugin. | 19 |
ParentEntityAwareInterface:: |
public | function | Sets the parent entity. | 1 |
PluginFormInterface:: |
public | function | Form constructor. | 36 |
PluginFormInterface:: |
public | function | Form submission handler. | 32 |
PluginFormInterface:: |
public | function | Form validation handler. | 18 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |
ShippingMethodInterface:: |
public | function | Calculates rates for the given shipment. | 3 |
ShippingMethodInterface:: |
public | function | Gets the default package type. | 1 |
ShippingMethodInterface:: |
public | function | Gets the shipping method label. | 1 |
ShippingMethodInterface:: |
public | function | Gets the shipping services. | 1 |
ShippingMethodInterface:: |
public | function | Gets the shipment workflow ID. | 1 |
ShippingMethodInterface:: |
public | function | Selects the given shipping rate for the given shipment. | 1 |