diff options
Diffstat (limited to 'lib/classes/sidebar/SeparatorElement.php')
| -rw-r--r-- | lib/classes/sidebar/SeparatorElement.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/classes/sidebar/SeparatorElement.php b/lib/classes/sidebar/SeparatorElement.php new file mode 100644 index 0000000..4cfb1ff --- /dev/null +++ b/lib/classes/sidebar/SeparatorElement.php @@ -0,0 +1,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)); + } +} |
