20 private const PREFIX_ID =
'iblock_grid_action_';
54 $this->entityId =
$options[
'ENTITY_ID'];
55 $this->iblockId =
$options[
'IBLOCK_ID'];
63 $this->request = Main\Context::getCurrent()->getRequest();
78 $actions ??= array_keys($this->actionHandlers);
112 if (
$code ===
'' || !isset($this->actionHandlers[
$code]))
117 $method =
'action'.$this->actionHandlers[
$code].
'Panel';
118 if (is_callable([$this,
$method]))
133 if (
$code ===
'' || !isset($this->actionHandlers[
$code]))
138 $method =
'action'.$this->actionHandlers[
$code].
'Request';
139 if (is_callable([$this,
$method]))
141 return call_user_func_array([$this,
$method], []);
180 'SECTIONS' =>
'TYPE.SECTIONS'
182 'filter' => [
'=ID' => $this->iblockId],
187 $this->iblockConfig[
'SECTIONS'] = $row[
'SECTIONS'];
188 $this->iblockConfig[
'SECTION_CHOOSER'] = $row[
'SECTION_CHOOSER'];
208 $value === self::GRID_TYPE_UI
209 || $value === self::GRID_TYPE_LIST
210 || $value === self::GRID_TYPE_SUBLIST
213 $this->gridType = $value;
230 return $this->
getGridType() === self::GRID_TYPE_UI;
261 return [
'JS' =>
"BX.adminUiList.SendSelected('{$this->getEntityId()}')"];
270 return self::PREFIX_ID.$this->getEntityId().
'_'.strtolower($id);
279 $result = $this->mainSnippet->getApplyButton([]);
281 $this->mainSnippet->setButtonActions(
301 $confirmMessage =
null;
303 isset(
$params[
'CONFIRM_MESSAGE'])
304 && is_string(
$params[
'CONFIRM_MESSAGE'])
305 &&
$params[
'CONFIRM_MESSAGE'] !==
''
308 $confirmMessage =
$params[
'CONFIRM_MESSAGE'];
311 isset(
$params[
'DEFAULT_CONFIRM_MESSAGE'])
312 && is_string(
$params[
'DEFAULT_CONFIRM_MESSAGE'])
313 &&
$params[
'DEFAULT_CONFIRM_MESSAGE'] !==
''
316 $confirmMessage =
$params[
'DEFAULT_CONFIRM_MESSAGE'];
319 $result = $this->mainSnippet->getApplyButton([]);
321 $this->mainSnippet->setButtonActions(
327 'CONFIRM_MESSAGE' => $confirmMessage,
343 if ($this->sections ===
null)
345 $this->sections = [];
346 if ($this->iblockId > 0)
348 $iterator = \CIBlockSection::getTreeList(
349 [
'IBLOCK_ID' => $this->iblockId],
350 [
'ID',
'NAME',
'DEPTH_LEVEL',
'LEFT_MARGIN']
354 $this->sections[] = [
355 'NAME' => str_repeat(
' . ', $row[
'DEPTH_LEVEL']).$row[
'NAME'],
356 'VALUE' => $row[
'ID']
377 'NAME' => Loc::getMessage(
'IBLOCK_GRID_PANEL_ACTION_MESS_SECTION_TOP_LEVEL'),
395 'type' =>
'multicontrol',
405 'ID' => $this->
getElementId($action[
'SECTION_LIST_ID']),
406 'NAME' =>
'section_to_move',
424 'type' =>
'multicontrol',
463 'type' =>
'multicontrol',
473 'ID' => $this->
getElementId($action[
'SECTION_LIST_ID']),
474 'NAME' =>
'section_to_move',
492 : Loc::getMessage(
'IBLOCK_GRID_PANEL_ACTION_EDIT')
513 : Loc::getMessage(
'IBLOCK_GRID_PANEL_ACTION_DELETE')
525 : Loc::getMessage(
'IBLOCK_GRID_PANEL_ACTION_ACTIVATE_MSGVER_2')
537 : Loc::getMessage(
'IBLOCK_GRID_PANEL_ACTION_DEACTIVATE_MSGVER_2')
549 : Loc::getMessage(
'IBLOCK_GRID_PANEL_ACTION_CLEAR_COUNTER')
552 $params[
'APPLY_BUTTON_ID'] =
'clear_counter_confirm';
553 $params[
'DEFAULT_CONFIRM_MESSAGE'] = Loc::getMessage(
'IBLOCK_GRID_PANEL_ACTION_CLEAR_COUNTER_CONFIRM');
559 'type' =>
'multicontrol',
585 : Loc::getMessage(
'IBLOCK_GRID_PANEL_ACTION_CODE_TRANSLITERATION_MSGVER_1')
588 $params[
'APPLY_BUTTON_ID'] =
'code_translit_confirm';
589 $params[
'DEFAULT_CONFIRM_MESSAGE'] = Loc::getMessage(
'IBLOCK_GRID_PANEL_ACTION_CODE_TRANSLITERATION_CONFIRM');
595 'type' =>
'multicontrol',
623 if ($this->iblockConfig[
'SECTIONS'] !=
'Y')
629 $params[
'NAME'] = Loc::getMessage(
'IBLOCK_GRID_PANEL_ACTION_ADJUST_SECTION');
632 $params[
'APPLY_BUTTON_ID'] =
'send_adjust_list';
635 $params[
'SECTION_LIST_ID'] =
'set_sections';
640 $params[
'SECTION_LIST_ID'] =
'set_sections';
650 $sectionId = $this->request->get(
'section_to_move');
651 return (is_string($sectionId) ? [
'SECTION_ID' => $sectionId] :
null);
664 if ($this->iblockConfig[
'SECTIONS'] !=
'Y')
670 $params[
'NAME'] = Loc::getMessage(
'IBLOCK_GRID_PANEL_ACTION_ADD_SECTION');
673 $params[
'APPLY_BUTTON_ID'] =
'send_add_list';
676 $params[
'SECTION_LIST_ID'] =
'additional_sections';
681 $params[
'SECTION_LIST_ID'] =
'additional_sections';
691 $sectionId = $this->request->get(
'section_to_move');
693 return (is_string($sectionId) ? [
'SECTION_ID' => $sectionId] :
null);
704 : Loc::getMessage(
'IBLOCK_GRID_PANEL_ACTION_ELEMENT_UNLOCK')
716 : Loc::getMessage(
'IBLOCK_GRID_PANEL_ACTION_ELEMENT_LOCK')
733 : Loc::getMessage(
'IBLOCK_GRID_PANEL_ACTION_ELEMENT_WORKFLOW_STATUS')
737 $iterator = \CWorkflowStatus::getDropDownList(
'N',
'desc');
741 'NAME' => $row[
'REFERENCE'],
742 'VALUE' => $row[
'REFERENCE_ID'],
751 $params[
'APPLY_BUTTON_ID'] =
'send_workflow_status';
756 'NAME' =>
'wf_status_id',
766 'type' =>
'multicontrol',
784 $result = $this->request->get(
'wf_status_id');
const ELEMENT_WORKFLOW_STATUS
getSections(bool $addTop=false)
actionElementWorkflowStatusRequest()
actionElementLockPanel(array $params=[])
getAddSectionList(array $action)
__construct(array $options)
actionDeactivatePanel(array $params=[])
getApplyButton(array $params)
actionAddSectionPanel(array $params=[])
actionSelectAllPanel(array $params=[])
actionActivatePanel(array $params=[])
getAdjustSectionList(array $action)
actionElementWorkflowStatusPanel(array $params=[])
actionDeletePanel(array $params=[])
actionClearCounterPanel(array $params=[])
actionAddSectionRequest()
actionEditPanel(array $params=[])
getApplyButtonWithConfirm(array $params)
getList(?array $actions=null)
actionCodeTranslitPanel(array $params=[])
actionAdjustSectionPanel(array $params=[])
getAddSectionDialog(array $action)
setGridType(string $value)
actionAdjustSectionRequest()
actionElementUnlockPanel(array $params=[])
const SECTION_CHOOSER_SELECT
const SECTION_CHOOSER_PATH
static includeModule($moduleName)
static getList(array $parameters=array())
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
if( $guestStatuses !=='') if(!is_array($guestStatuses)) $statusList