Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
detailviewitem.php
1<?php
2
4
5use Bitrix\Iblock\Grid\Row\Actions\Item\Helpers\WithUrl;
10
11final class DetailViewItem extends BaseAction
12{
13 use WithUrl;
14
15 public static function getId(): string
16 {
17 return 'detail_view';
18 }
19
20 public function processRequest(HttpRequest $request): ?Result
21 {
22 // only open url
23
24 return null;
25 }
26
27 protected function getText(): string
28 {
29 return Loc::getMessage('IBLOCK_GRID_ROW_ACTIONS_DETAIL_VIEW_NAME');
30 }
31
32 public function getControl(array $rawFields): ?array
33 {
34 if (empty($this->url))
35 {
36 return null;
37 }
38
39 $this->default = true;
40 $this->onclick = "top.BX.SidePanel.Instance.open('" . $this->getUrlForOnclick() . "')";
41
42 return parent::getControl($rawFields);
43 }
44}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29