public function populate(Smarty_Template_Source
$source, ?Smarty_Internal_Template
$_template = null
) { if (!
isset($source->smarty->registered_plugins
[Smarty::PLUGIN_BLOCK
]['snippet'
])) { $source->smarty->
registerPlugin(Smarty::PLUGIN_BLOCK, 'snippet',
[__CLASS__, 'compileSnippetBlock'
]);
} if (!
isset($source->smarty->registered_plugins
[Smarty::PLUGIN_MODIFIER
]['snippet'
])) { $source->smarty->
registerPlugin(Smarty::PLUGIN_MODIFIER, 'snippet',
[$this, 'compileSnippetModifier'
]);
} $default_resource =
$source->smarty->default_resource_type;
$source->smarty->default_resource_type = 'file';
parent::
populate($source,
$_template);
$source->smarty->default_resource_type =
$default_resource;
} /**
* Compiles the given snippet block if the content parameter is filled.
*
* @param array<string, mixed> $params
* @param string|null $content
*
* @return string
*/