Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
bypublicmode.php
1<?php
3
8
9Loc::loadMessages(__FILE__);
10
17{
18 public static function getClassTitle()
19 {
20 return Loc::getMessage("SALE_DLVR_RSTR_BY_PUBLIC_MODE_NAME");
21 }
22
23 public static function getClassDescription()
24 {
25 return Loc::getMessage("SALE_DLVR_RSTR_BY_PUBLIC_MODE_DESCRIPT");
26 }
27
28 public static function check($dummy, array $restrictionParams, $deliveryId = 0)
29 {
30 $context = Application::getInstance()->getContext();
31 $request = $context->getRequest();
32
33 if (empty($restrictionParams) || $request->isAdminSection() || (defined("BX_PUBLIC_MODE") && BX_PUBLIC_MODE == true))
34 return true;
35
36 return $restrictionParams["PUBLIC_SHOW"] == 'Y';
37 }
38
39 protected static function extractParams(Entity $shipment)
40 {
41 return null;
42 }
43
44 public static function getParamsStructure($entityId = 0)
45 {
46 return array(
47 "PUBLIC_SHOW" => array(
48 'TYPE' => 'Y/N',
49 'VALUE' => 'Y',
50 'LABEL' => Loc::getMessage("SALE_DLVR_RSTR_BY_PUBLIC_MODE_SHOW")
51 )
52 );
53 }
54}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29
static check($dummy, array $restrictionParams, $deliveryId=0)