3namespace Bitrix\Iblock\Grid\Panel\UI\Actions\Item\ElementGroup;
5use Bitrix\Iblock\Grid\ActionType;
6use Bitrix\Iblock\Grid\Helpers\CodeTranslator;
7use Bitrix\Iblock\Grid\Panel\UI\Actions\Helpers\ItemFinder;
8use Bitrix\Iblock\Grid\RowType;
10use Bitrix\Main\Filter\Filter;
11use Bitrix\Main\Grid\Panel\Actions;
12use Bitrix\Main\Grid\Panel\Snippet;
13use Bitrix\Main\Grid\Panel\Snippet\Onchange;
14use Bitrix\Main\HttpRequest;
15use Bitrix\Main\Localization\Loc;
16use Bitrix\Main\Result;
30 public static function getId(): string
37 return Loc::getMessage(
'IBLOCK_GRID_PANEL_UI_ACTIONS_ELEMENT_GROUP_CREATE_CODE_NAME_MSGVER_1');
49 if ($isSelectedAllRows)
51 [$elements, $sections] = $this->getItemsByFilter(
$select,
$filter);
63 $elements = $this->getElementsByIdList(
$select, $elementIds);
64 $sections = $this->getSectionsByIdList(
$select, $sectionIds);
66 unset($elementIds, $sectionIds);
72 $this->processCodeTranslitElements($elements)->
getErrors()
79 $this->processCodeTranslitSections($sections)->
getErrors()
88 $confirmMessage = Loc::getMessage(
'IBLOCK_GRID_PANEL_UI_ACTIONS_ELEMENT_GROUP_CREATE_CODE_CONFIRM');
92 'ACTION' => Actions::RESET_CONTROLS,
95 'ACTION' => Actions::CREATE,
97 (
new Snippet)->getSendSelectedButton($confirmMessage),
103 private function processCodeTranslitElements(
array $elements):
Result
106 $entity =
new CIBlockElement();
107 $translitSettings = $this->getElementTranslitSettings();
109 foreach ($elements as $row)
115 $message = Loc::getMessage(
'IBLOCK_GRID_PANEL_UI_CREATE_CODE_GROUP_CHILD_ACCESS_DENIED_ELEMENT', [
126 'CODE' => CUtil::translit(
133 if (!$updateResult &&
$entity->getLastError())
144 private function processCodeTranslitSections(
array $sections):
Result
148 $translitSettings = $this->getSectionTranslitSettings();
150 foreach ($sections as $row)
156 $message = Loc::getMessage(
'IBLOCK_GRID_PANEL_UI_CREATE_CODE_GROUP_CHILD_ACCESS_DENIED_SECTION', [
167 'CODE' => CUtil::translit(
174 if (!$updateResult &&
$entity->getLastError())
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
processRequest(HttpRequest $request, bool $isSelectedAllRows, ?Filter $filter=null)
static parseIndexList(array $ids)
getRequestRows(HttpRequest $request)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)