Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
group.php
1<?php
2
4
5use Bitrix\Main\Entity\EntityError;
9
10Loc::loadMessages(__FILE__);
11
12class Group extends Base
13{
15 protected $handlerCode = 'BITRIX_GROUP';
16
17 public function __construct(array $initParams)
18 {
19 if(!isset($initParams["ACTIVE"]))
20 $initParams["ACTIVE"] = "Y";
21
22 $initParams["CONFIG"] = array();
23
24 parent::__construct($initParams);
25 }
26
27 public static function getClassTitle()
28 {
29 return Loc::getMessage("SALE_DLVR_HANDL_GROUP_NAME");
30 }
31
32 public static function getClassDescription()
33 {
34 return Loc::getMessage("SALE_DLVR_HANDL_GROUP_DESCRIPTION");
35 }
36
37 protected function calculateConcrete(Shipment $shipment)
38 {
39 $result = new CalculationResult();
40
41 $result->addError(new EntityError(
42 Loc::getMessage("SALE_DLVR_HANDL_GROUP_ERROR_CALCULATION"),
43 'DELIVERY_CALCULATION'
44 ));
45
46 return $result;
47 }
48
49 protected function getConfigStructure()
50 {
51 return array();
52 }
53
54 public static function getAdminFieldsList()
55 {
56 return array(
57 "ID" => true,
58 "NAME" => true,
59 "ACTIVE" => true,
60 "DESCRIPTION" => true,
61 "SORT" => true,
62 );
63 }
64
65 public static function whetherAdminRestrictionsShow()
66 {
67 return false;
68 }
69
70 public static function canHasChildren()
71 {
72 return true;
73 }
74
75 public static function isHandlerCompatible()
76 {
77 return true;
78 }
79}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29
calculateConcrete(Shipment $shipment)
Definition group.php:37
__construct(array $initParams)
Definition group.php:17