Documentation

process

string public static
\Bitrix\Iblock\Template\Engine::process(
 \Bitrix\Iblock\Template\Entity\Base $entity,
 string $template
);

Method receives entity ('element, section or iblock) and processes template for it. Static method.

Parameters

ParameterDescriptionVersion
$entityEntity for template processing.
$templateTemplate to be replaced.

Example

if (\Bitrix\Main\Loader::includeModule('iblock'))
{
	$e = new \Bitrix\Iblock\Template\Entity\Element(6369);
	echo "<pre>", print_r(\Bitrix\Iblock\Template\Engine::process($e, "Name: {=this.Name}. Code:{=this.code}"), 1), "</pre>";
}



© «Bitrix24», 2001-2024