aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/WidgetElement.php
blob: d53787557c63e8fa7429b0c637e40594f3010b06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
 * Generic widget element
 *
 * @author  Jan-Hendrik Willms <tleilax+studip@gmail.com>
 * @license GPL 2 or later
 * @since 3.1
 */
class WidgetElement
{
    /**
     * The content of the element
     */
    protected $content;

    /**
     * Constructs the element (with an optional content).
     *
     * @param mixed $content Optional content, defaults to empty string
     */
    public function __construct($content = '')
    {
        $this->content = $content;
    }

    /**
     * Renders the element.
     *
     * @return String The rendered content
     */
    public function render()
    {
        return $this->content;
    }
}