Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Do you have a question "how to copy an infoblock?" or "how to hang it on an event?":
If you need to hang it on an event, then it's done like this:
code in init.php
$eventManager = \Bitrix\Main\EventManager::getInstance();
$eventManager->addEventHandler(
"main",//код модуля из которого это событие
"EventName",//Нужное Вам событие
array('Vendor\Iblock\Copy', "copyIblock")//Класс и имя функции копирования
);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question