You are here

class CommerceShippingMethod in Commerce Shipping 8.2

Defines the shipping method plugin annotation object.

Plugin namespace: Plugin\Commerce\ShippingMethod.

Hierarchy

Expanded class hierarchy of CommerceShippingMethod

See also

Plugin API

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\Annotation
View 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

Namesort descending Modifiers Type Description Overrides
CommerceShippingMethod::$id public property The plugin ID.
CommerceShippingMethod::$label public property The shipping method label.
CommerceShippingMethod::$services public property The supported shipping services.
CommerceShippingMethod::$workflow public property The shipment workflow.
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2