class CommerceShippingMethod in Commerce Shipping 8.2
Defines the shipping method plugin annotation object.
Plugin namespace: Plugin\Commerce\ShippingMethod.
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements AnnotationInterface
- class \Drupal\commerce_shipping\Annotation\CommerceShippingMethod
Expanded class hierarchy of CommerceShippingMethod
See also
5 classes are annotated with CommerceShippingMethod
- DynamicRate in tests/
modules/ commerce_shipping_test/ src/ Plugin/ Commerce/ ShippingMethod/ DynamicRate.php - Provides the Dynamic shipping method. Prices multiplied by weight of package.
- ExceptionThrower in tests/
modules/ commerce_shipping_test/ src/ Plugin/ Commerce/ ShippingMethod/ ExceptionThrower.php - Provides a shipping method that throws an exception when calculating rates.
- FlatRate in src/
Plugin/ Commerce/ ShippingMethod/ FlatRate.php - Provides the FlatRate shipping method.
- FlatRatePerItem in src/
Plugin/ Commerce/ ShippingMethod/ FlatRatePerItem.php - Provides the FlatRatePerItem shipping method.
- Test in tests/
modules/ commerce_shipping_test/ src/ Plugin/ Commerce/ ShippingMethod/ Test.php - Provides the Test shipping method.
File
- src/
Annotation/ CommerceShippingMethod.php, line 16
Namespace
Drupal\commerce_shipping\AnnotationView source
class CommerceShippingMethod extends Plugin {
/**
* The plugin ID.
*
* @var string
*/
public $id;
/**
* The shipping method label.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*/
public $label;
/**
* The supported shipping services.
*
* An array of labels keyed by ID.
*
* @var array
*/
public $services = [];
/**
* The shipment workflow.
*
* @var string
*/
public $workflow = 'shipment_default';
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CommerceShippingMethod:: |
public | property | The plugin ID. | |
CommerceShippingMethod:: |
public | property | The shipping method label. | |
CommerceShippingMethod:: |
public | property | The supported shipping services. | |
CommerceShippingMethod:: |
public | property | The shipment workflow. | |
Plugin:: |
protected | property | The plugin definition read from the class annotation. | 1 |
Plugin:: |
public | function |
Gets the value of an annotation. Overrides AnnotationInterface:: |
5 |
Plugin:: |
public | function |
Gets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the unique ID for this annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
protected | function | Parses an annotation into its definition. | |
Plugin:: |
public | function |
Sets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Sets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function | Constructs a Plugin object. | 2 |