aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/sidebar/SeparatorElement.php
blob: 4cfb1ffb33511478bbff1eb6131880d406a96da2 (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
<?php

class SeparatorElement extends WidgetElement
{
    public $attributes = [];

    /**
     * create a separator element
     *
     * @param array  $attributes HTML-attributes in an associative array.
     */
    public function __construct($attributes = [])
    {
        parent::__construct();

        $this->attributes = $attributes;
    }

    /**
     * Renders the element.
     *
     * @return string
     */
    public function render()
    {
        return sprintf('<hr %s>', arrayToHtmlAttributes($this->attributes));
    }
}