Created
June 27, 2017 07:50
-
-
Save manoj-apare/3d6b1b096f7132e8aca07702a78010b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\commerce_shipping\Packer; | |
use Drupal\Core\Entity\EntityTypeManagerInterface; | |
use Drupal\commerce_order\Entity\OrderInterface; | |
use Drupal\profile\Entity\ProfileInterface; | |
use Drupal\commerce_shipping\Packer\PackerInterface; | |
/** | |
* Creates multiple shipment based on location. | |
*/ | |
class CustomPacker implements PackerInterface { | |
/** | |
* The entity type manager. | |
* | |
* @var \Drupal\Core\Entity\EntityTypeManagerInterface | |
*/ | |
protected $entityTypeManager; | |
/** | |
* Constructs a new DefaultPacker object. | |
* | |
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager | |
* The entity type manager. | |
*/ | |
public function __construct(EntityTypeManagerInterface $entity_type_manager) { | |
$this->entityTypeManager = $entity_type_manager; | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function applies(OrderInterface $order, ProfileInterface $shipping_profile) { | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function pack(OrderInterface $order, ProfileInterface $shipping_profile) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment