You are here

interface PackageTypeInterface in Commerce Shipping 8.2

Same name in this branch
  1. 8.2 src/Entity/PackageTypeInterface.php \Drupal\commerce_shipping\Entity\PackageTypeInterface
  2. 8.2 src/Plugin/Commerce/PackageType/PackageTypeInterface.php \Drupal\commerce_shipping\Plugin\Commerce\PackageType\PackageTypeInterface

Defines the interface for package types.

Hierarchy

Expanded class hierarchy of PackageTypeInterface

All classes that implement PackageTypeInterface

2 files declare their use of PackageTypeInterface
Shipment.php in src/Entity/Shipment.php
ShipmentInterface.php in src/Entity/ShipmentInterface.php

File

src/Plugin/Commerce/PackageType/PackageTypeInterface.php, line 8

Namespace

Drupal\commerce_shipping\Plugin\Commerce\PackageType
View source
interface PackageTypeInterface {

  /**
   * Gets the package type ID.
   *
   * @return string
   *   The package type ID.
   */
  public function getId();

  /**
   * Gets the package type remote ID.
   *
   * @return string
   *   The package type remote ID, or "custom" if the package type was not
   *   predefined by the remote API.
   */
  public function getRemoteId();

  /**
   * Gets the translated label.
   *
   * @return string
   *   The translated label.
   */
  public function getLabel();

  /**
   * Gets the package type length.
   *
   * @return \Drupal\physical\Length
   *   The package type length.
   */
  public function getLength();

  /**
   * Gets the package type width.
   *
   * @return \Drupal\physical\Length
   *   The package type width.
   */
  public function getWidth();

  /**
   * Gets the package type height.
   *
   * @return \Drupal\physical\Length
   *   The package type height.
   */
  public function getHeight();

  /**
   * Gets the package type weight.
   *
   * This is the weight of an empty package.
   *
   * @return \Drupal\physical\Weight
   *   The package type weight.
   */
  public function getWeight();

}

Members

Namesort descending Modifiers Type Description Overrides
PackageTypeInterface::getHeight public function Gets the package type height. 1
PackageTypeInterface::getId public function Gets the package type ID. 1
PackageTypeInterface::getLabel public function Gets the translated label. 1
PackageTypeInterface::getLength public function Gets the package type length. 1
PackageTypeInterface::getRemoteId public function Gets the package type remote ID. 1
PackageTypeInterface::getWeight public function Gets the package type weight.
PackageTypeInterface::getWidth public function Gets the package type width. 1