Add documentation for image closure support

This commit is contained in:
Michel Bardelmeijer 2019-09-09 13:55:59 +02:00
parent 5a68ef600b
commit 6ed320311e
1 changed files with 5 additions and 0 deletions

View File

@ -63,6 +63,11 @@ Example:
$templateProcessor->setImageValue('CompanyLogo', 'path/to/company/logo.png');
$templateProcessor->setImageValue('UserLogo', array('path' => 'path/to/logo.png', 'width' => 100, 'height' => 100, 'ratio' => false));
$templateProcessor->setImageValue('FeatureImage', function () {
// Closure will only be executed if the replacement tag is found in the template
return array('path' => SlowFeatureImageGenerator::make(), 'width' => 100, 'height' => 100, 'ratio' => false);
});
cloneBlock
""""""""""