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