16 protected static function load(ImportBase $item, array $fields, $order=
null)
18 if($item->getOwnerTypeId() <> static::getParentEntityTypeId())
20 if($item instanceof EntityImport)
22 $item->setParentEntity($order);
33 protected function getProductsItems(array $fields)
35 return (isset($fields[
'ITEMS']) && is_array($fields[
'ITEMS'])) ? $fields[
'ITEMS']:array();
43 protected function hasDocumentByTypeId($type_id, array $documents)
45 $documentImport = $this->getDocumentByTypeId($type_id, $documents);
47 return ($documentImport !==
null);
55 protected function getDocumentByTypeId($type_id, array $documents)
57 foreach($documents as $document)
59 if(DocumentType::isDefined($type_id))
61 if($document->getTypeId() == $type_id)
76 protected function getEntityByTypeId($type_id, array $items)
78 foreach($items as $item)
82 if($item->getOwnerTypeId() == $type_id)
96 protected function deliveryServiceExists(array $list)
98 $deliveryItem = $this->getDeliveryServiceItem($list);
100 return !($deliveryItem ===
null);
static isDefined($typeID)