1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
packagetrait.php
См. документацию.
1<?php
2
3namespace Bitrix\Sale\Exchange;
4
5
6use Bitrix\Sale\Exchange\Entity\EntityImport;
7use Bitrix\Sale\Exchange\OneC\DocumentType;
8
9trait PackageTrait
10{
16 protected static function load(ImportBase $item, array $fields, $order=null)
17 {
18 if($item->getOwnerTypeId() <> static::getParentEntityTypeId())
19 {
20 if($item instanceof EntityImport)
21 {
22 $item->setParentEntity($order);
23 }
24 }
25
26 $item->load($fields);
27 }
28
33 protected function getProductsItems(array $fields)
34 {
35 return (isset($fields['ITEMS']) && is_array($fields['ITEMS'])) ? $fields['ITEMS']:array();
36 }
37
43 protected function hasDocumentByTypeId($type_id, array $documents)
44 {
45 $documentImport = $this->getDocumentByTypeId($type_id, $documents);
46
47 return ($documentImport !== null);
48 }
49
55 protected function getDocumentByTypeId($type_id, array $documents)
56 {
57 foreach($documents as $document)
58 {
59 if(DocumentType::isDefined($type_id))
60 {
61 if($document->getTypeId() == $type_id)
62 {
63 return $document;
64 }
65 }
66 }
67
68 return null;
69 }
70
76 protected function getEntityByTypeId($type_id, array $items)
77 {
78 foreach($items as $item)
79 {
81 {
82 if($item->getOwnerTypeId() == $type_id)
83 {
84 return $item;
85 }
86 }
87 }
88
89 return null;
90 }
91
96 protected function deliveryServiceExists(array $list)
97 {
98 $deliveryItem = $this->getDeliveryServiceItem($list);
99
100 return !($deliveryItem === null);
101 }
102}
load(array $productIds)
Определения skutree.php:104
static isDefined($typeID)
Определения entitytype.php:46
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
foreach(CLists::GetPermission() as $type_id=> $groups)(in_array($type_id, $arIBTypes["REFERENCE_ID"]))($groups as $group)("group_right[n". $i."]", $arGroups, $group, GetMessage("LISTS_OPTIONS_CHOOSE_GROUP"))?></td >< td ><?echo SelectBoxFromArray("type_right[n". $i."]" $type_id
Определения options.php:152