onAfterDemoCreate
Informs its own handlers about a site created using specific template.
Parameters:
Class | Description | Available from version |
---|---|---|
id | Site ID. | |
code | Selected template ID. |
Example
$eventManager = \Bitrix\Main\EventManager::getInstance(); $eventManager->addEventHandler('landing', 'onAfterDemoCreate', function(\Bitrix\Main\Event $event) { $result = new \Bitrix\Main\Entity\EventResult; $siteId = $event->getParameter('id'); $code = $event->getParameter('code'); if ($code == 'spa') { // } return $result; } );
© «Bitrix24», 2001-2024