3declare(strict_types=1);
5namespace Bitrix\Im\V2\Controller;
8use Bitrix\Im\V2\Promotion\Internals\DeviceType;
9use Bitrix\Main\DI\ServiceLocator;
10use Bitrix\Main\Engine\AutoWire\Parameter;
11use Bitrix\Main\Engine\Controller;
12use Bitrix\Im\V2\Promotion\Entity;
13use Bitrix\Main\Validation\Engine\AutoWire\ValidationParameter;
26 $requestData =
$request->getPostList()->toArray();
28 return new Entity\Promotion(
29 $requestData[
'id'] ??
'',
30 $requestData[
'params'] ?? [],
38 $requestData =
$request->getPostList()->toArray();
40 $type = $requestData[
'type'] ?? DeviceType::ALL->value;
42 return DeviceType::tryFrom(
$type);
54 'result' => $this->promoService->markAsViewed($promo)->isSuccess(),
68 return $this->promoService->getActive(
$type)->toRestFormat();
71 protected function init(): void
75 $this->promoService = ServiceLocator::getInstance()->get(
'Im.Services.Promotion');
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)