Guest User

Untitled

a guest
Jan 24th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. public function get($id)
  2.  
  3. MagentoSalesModelOrderRepository
  4.  
  5. public function get($id)
  6. {
  7. if (!$id) {
  8. throw new InputException(__('Id required'));
  9. }
  10. if (!isset($this->registry[$id])) {
  11. /** @var OrderInterface $entity */
  12. $entity = $this->metadata->getNewInstance()->load($id);
  13. if (!$entity->getEntityId()) {
  14. throw new NoSuchEntityException(__('Requested entity doesn't exist'));
  15. }
  16. $this->setShippingAssignments($entity);
  17. $this->registry[$id] = $entity;
  18. }
  19. return $this->registry[$id];
  20. }
  21.  
  22. $this->metadata->getNewInstance()->load($id);
  23.  
  24. MagentoSalesModelResourceModelMetadata
  25.  
  26. MagentoSalesModelOrder
  27.  
  28. $this->loadWithCustomAttributes();
Add Comment
Please, Sign In to add comment