Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
crmentitylinkbuilder.php
1<?php
2
4
7
8Loader::requireModule('crm');
9
14{
15 private \Bitrix\Crm\Service\Sale\EntityLinkBuilder\EntityLinkBuilder $builder;
16
17 public function __construct()
18 {
19 $this->builder = \Bitrix\Crm\Service\Sale\EntityLinkBuilder\EntityLinkBuilder::getInstance();
20 }
21
29 public function getEntityDetailUrl(int $orderId): string
30 {
31 return (string)$this->builder->getEntityDetailUrlByOrderId($orderId);
32 }
33
37 public function getOrderDetailUrl(int $orderId): string
38 {
39 return "/shop/orders/details/{$orderId}/";
40 }
41
45 public function getShipmentDetailsLink(int $orderId, int $shipmentId): string
46 {
47 return (string)$this->builder->getShipmentDetailsLink($shipmentId);
48 }
49
53 public function getPaymentDetailsLink(int $orderId, int $paymentId): string
54 {
55 return (string)$this->builder->getPaymentDetailsLink($paymentId);
56 }
57}