19 declare(strict_types=1);
26 public function __construct(
private readonly
string $button_label,
string $http_post_param_name)
32 public function addItem(
string $label): void
34 $this->items[] = $label;
39 $tpl =
new ilTemplate(
'tpl.mail_new_attachments.html',
true,
true,
'components/ILIAS/Mail');
41 foreach ($this->items as $item) {
42 $tpl->setCurrentBlock(
'attachment_list_item');
43 $tpl->setVariable(
'ATTACHMENT_LABEL', $item);
44 $tpl->parseCurrentBlock();
46 $tpl->setVariable(
'ATTACHMENT_BUTTON_LABEL', $this->button_label);
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
setVariable($variable, $value='')
Sets a variable value.
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
__construct(Container $dic, ilPlugin $plugin)