1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
entitytype.php
См. документацию.
1<?php
2namespace Bitrix\Sale\Services\Company\Restrictions;
3
4use Bitrix\Main\Localization\Loc;
5use Bitrix\Sale\Order;
6use Bitrix\Sale\Payment;
7use Bitrix\Sale\PaymentCollection;
8use Bitrix\Sale\Services\Base\Restriction;
9use Bitrix\Sale\Internals;
10use Bitrix\Sale\Services\Company;
11use Bitrix\Sale\Shipment;
12use Bitrix\Sale\ShipmentCollection;
13
14Loc::loadMessages(__FILE__);
15
17{
18 const ENTITY_NONE = 'N';
19 const ENTITY_PAYMENT = 'P';
20 const ENTITY_SHIPMENT = 'S';
21 const ENTITY_ORDER = 'O';
22
26 public static function getClassTitle()
27 {
28 return Loc::getMessage('SALE_COMPANY_RULES_BY_ENTITY_TITLE');
29 }
30
34 public static function getClassDescription()
35 {
36 return Loc::getMessage('SALE_COMPANY_RULES_BY_ENTITY_DESC');
37 }
38
39
44 public static function getParamsStructure($entityId = 0)
45 {
46 return array(
47 "ENTITY_TYPE" => array(
48 "TYPE" => "ENUM",
49 "LABEL" => Loc::getMessage("SALE_COMPANY_RULES_BY_ENTITY"),
50 "OPTIONS" => array(
51 self::ENTITY_NONE => Loc::getMessage('SALE_COMPANY_RULES_BY_ENTITY_NONE'),
52 self::ENTITY_PAYMENT => Loc::getMessage('SALE_COMPANY_RULES_BY_ENTITY_PAYMENT'),
53 self::ENTITY_SHIPMENT => Loc::getMessage('SALE_COMPANY_RULES_BY_ENTITY_SHIPMENT'),
54 self::ENTITY_ORDER => Loc::getMessage('SALE_COMPANY_RULES_BY_ENTITY_ORDER'),
55 )
56 )
57 );
58 }
59
60
65 protected static function extractParams(Internals\Entity $entity)
66 {
68 if ($entity instanceof Payment)
69 return self::ENTITY_PAYMENT;
70
71 if ($entity instanceof Shipment)
72 return self::ENTITY_SHIPMENT;
73
74 if ($entity instanceof Order)
75 return self::ENTITY_ORDER;
76
77 return self::ENTITY_NONE;
78 }
79
86 public static function check($params, array $restrictionParams, $serviceId = 0)
87 {
88 return $params == $restrictionParams['ENTITY_TYPE'];
89 }
90
95 public static function getSeverity($mode)
96 {
98 }
99}
Определения payment.php:19
static extractParams(Entity $entity)
Определения restriction.php:115
static check($params, array $restrictionParams, $serviceId=0)
Определения entitytype.php:86
static getParamsStructure($entityId=0)
Определения entitytype.php:44
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$entity
Определения ufield.php:9
$entityId
Определения payment.php:4
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799