1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
storedocumenttablemanager.php
См. документацию.
1<?php
2
3namespace Bitrix\Catalog\Document;
4
5use Bitrix\Catalog\Document\Type\StoreDocumentArrivalTable;
6use Bitrix\Catalog\Document\Type\StoreDocumentDeductTable;
7use Bitrix\Catalog\Document\Type\StoreDocumentMovingTable;
8use Bitrix\Catalog\Document\Type\StoreDocumentReturnTable;
9use Bitrix\Catalog\Document\Type\StoreDocumentStoreAdjustmentTable;
10use Bitrix\Catalog\Document\Type\StoreDocumentUndoReserveTable;
11use Bitrix\Catalog\StoreDocumentTable;
12
14{
15 private static $typeClassMap = [
16 StoreDocumentTable::TYPE_ARRIVAL => StoreDocumentArrivalTable::class,
17 StoreDocumentTable::TYPE_STORE_ADJUSTMENT => StoreDocumentStoreAdjustmentTable::class,
18 StoreDocumentTable::TYPE_MOVING => StoreDocumentMovingTable::class,
19 StoreDocumentTable::TYPE_DEDUCT => StoreDocumentDeductTable::class,
20 StoreDocumentTable::TYPE_RETURN => StoreDocumentReturnTable::class,
21 StoreDocumentTable::TYPE_UNDO_RESERVE => StoreDocumentUndoReserveTable::class,
22 ];
23
28 public static function getTableClassByType(string $docType): string
29 {
30 return self::$typeClassMap[$docType] ?? '';
31 }
32
36 public static function getUfEntityIds(): array
37 {
38 return array_map(static fn($tableClass): string => $tableClass::getUfId(), self::$typeClassMap);
39 }
40
45 public static function getTypeByUfId(string $entityId): string
46 {
47 $map = array_flip(self::getUfEntityIds());
48
49 return $map[$entityId] ?? '';
50 }
51}
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$map
Определения config.php:5
$entityId
Определения payment.php:4