1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
bypublicmode.php
См. документацию.
1<?php
2namespace Bitrix\Sale\Delivery\Restrictions;
3
4use Bitrix\Main\Application;
5use Bitrix\Sale\Delivery\Restrictions;
6use Bitrix\Main\Localization\Loc;
7use Bitrix\Sale\Internals\Entity;
8
9Loc::loadMessages(__FILE__);
10
15
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}
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
Определения catalog_reindex.php:36
static check($dummy, array $restrictionParams, $deliveryId=0)
Определения bypublicmode.php:28
static extractParams(Entity $shipment)
Определения bypublicmode.php:39
static getParamsStructure($entityId=0)
Определения bypublicmode.php:44
const BX_PUBLIC_MODE
Определения file_edit.php:2
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$context
Определения csv_new_setup.php:223
Определения ufield.php:9
$entityId
Определения payment.php:4