1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4/**
5 * Class ilChatroomSmiliesCurrentSmileyFormElement
6 * Class ilchatroomSmiliesCurrentSmileyFormElement
7 * simple form element that displays an image; does not add data to the containing form
8 * but may be initialized by default methods, such as valuesByArray
9 * @author  Jan Posselt <jposselt@databay.de>
10 * @version $Id$
11 * @ingroup ModulesChatroom
12 */
13class ilChatroomSmiliesCurrentSmileyFormElement extends ilCustomInputGUI
14{
15
16    /**
17     * Returns template HTML.
18     * @return string
19     */
20    public function getHtml()
21    {
22        global $DIC;
23
24        $tpl = new ilTemplate("tpl.chatroom_current_smiley_image.html", true, true, "Modules/Chatroom");
25        $tpl->setVariable("IMAGE_ALT", $DIC->language()->txt("chatroom_current_smiley_image"));
26        $tpl->setVariable("IMAGE_PATH", $this->value);
27
28        return $tpl->get();
29    }
30
31    /**
32     * Returns $this->value of ilChatroomSmiliesCurrentSmileyFormElement
33     * @return string
34     */
35    public function getValue()
36    {
37        return $this->value;
38    }
39
40    /**
41     * Sets given value as $this->value in
42     * ilChatroomSmiliesCurrentSmileyFormElement
43     * @param string $a_value
44     */
45    public function setValue($a_value)
46    {
47        $this->value = $a_value;
48    }
49
50    /**
51     * Set value by array
52     * @param    array $a_values value array
53     */
54    /*function setValueByArray($a_values)
55     {
56        $this->setValue( $a_values[$this->getPostVar()] );
57        }*/
58
59    /**
60     * Check Input
61     * @return boolean
62     */
63    public function checkInput()
64    {
65        return true;
66    }
67}
68