public function PackerInterface::applies in Commerce Shipping 8.2
Determines whether the packer applies to the given order.
Parameters
\Drupal\commerce_order\Entity\OrderInterface $order: The order.
\Drupal\profile\Entity\ProfileInterface $shipping_profile: The shipping profile.
Return value
bool TRUE if the packer applies to the given order, FALSE otherwise.
2 methods override PackerInterface::applies()
- DefaultPacker::applies in src/
Packer/ DefaultPacker.php - Determines whether the packer applies to the given order.
- TestPacker::applies in tests/
modules/ commerce_shipping_test/ src/ Packer/ TestPacker.php - Determines whether the packer applies to the given order.
File
- src/
Packer/ PackerInterface.php, line 33
Class
- PackerInterface
- Creates one or more shipments for a given order.
Namespace
Drupal\commerce_shipping\PackerCode
public function applies(OrderInterface $order, ProfileInterface $shipping_profile);