ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilMailFormAttachmentFormPropertyGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
12include_once 'Services/Form/classes/class.ilFormPropertyGUI.php';
13
15{
17 public $items = array();
18
23 public function __construct($buttonLabel)
24 {
25 global $lng;
26
27 $this->buttonLabel = $buttonLabel;
28 parent::__construct($lng->txt('attachments'));
29 }
30
36 public function addItem($label)
37 {
38 $this->items[] = $label;
39 }
40
41 public function insert($a_tpl)
42 {
43 $tpl = new ilTemplate('tpl.mail_new_attachments.html', true, true, 'Services/Mail');
44
45 foreach($this->items as $item)
46 {
47 $tpl->setCurrentBlock('attachment_list_item');
48 $tpl->setVariable('ATTACHMENT_LABEL', $item);
49 $tpl->parseCurrentBlock();
50 }
51 $tpl->setVariable('ATTACHMENT_BUTTON_LABEL', $this->buttonLabel);
52
53 $a_tpl->setCurrentBlock("prop_generic");
54 $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
55 $a_tpl->parseCurrentBlock();
56 }
57}
58
59?>
global $tpl
Definition: ilias.php:8
This class represents a property in a property form.
__construct($buttonLabel)
Form Element for showing Mail Attachments.
special template class to simplify handling of ITX/PEAR
global $lng
Definition: privfeed.php:40