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