addEnclosuresToTemplate() public static method

Add enclosures to a template
public static addEnclosuresToTemplate ( object $objTemplate, array $arrItem, string $strKey = 'enclosure' )
$objTemplate object The template object to add the enclosures to
$arrItem array The element or module as array
$strKey string The name of the enclosures field in $arrItem
 /**
  * Add an enclosure to a template.
  *
  * @param AddEnclosureToTemplateEvent $event The event.
  *
  * @return void
  */
 public function handleAddEnclosureToTemplate(AddEnclosureToTemplateEvent $event)
 {
     Controller::addEnclosuresToTemplate($event->getTemplate(), $event->getEnclosureData(), $event->getKey());
 }