onBlockPublicView
Event is called directly before issuing block content to a published page.
Parameters
Parameter | Description | Available from version |
---|---|---|
block | Block object, allows to access its fields, manifest and etc. | |
outputContent | Content to be displayed at the page. Please be advised, presently, $block->getContent() can contain different content before pre-processing by kernel.
Method must return content to be displayed at the page. |
Example
use \Bitrix\Main\EventManager; use \Bitrix\Main\Event; $eventManager = EventManager::getInstance(); $eventManager->addEventHandler('landing', 'onBlockPublicView', function(Event $event) use($query) { $outputContent = $event->getParameter('outputContent'); /** * какие-то действия с $outputContent */ return $outputContent; } );
© «Bitrix24», 2001-2024