aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/forms/Fieldset.php
blob: e7bced0a1b8d5478a414e42e820e835ad78cbd75 (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
<?php

namespace Studip\Forms;

class Fieldset extends Part
{
    protected $legend = null;

    public function __construct($legend = null)
    {
        $this->legend = $legend;
    }

    public function setLegend($legend)
    {
        $this->legend = $legend;
    }

    public function render()
    {
        $template = $GLOBALS['template_factory']->open('forms/fieldset');
        $template->legend = $this->legend;
        $template->parts = $this->parts;
        return $template->render();
    }
}