mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-02-13 07:53:29 -05:00
BaseElement: add createElement helper
This commit is contained in:
parent
78f02ad403
commit
c56c66d193
1 changed files with 15 additions and 0 deletions
|
|
@ -68,6 +68,21 @@ abstract class BaseElement extends Html
|
|||
return $this->tag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Container constructor.
|
||||
*
|
||||
* @param string $tag
|
||||
* @param Attributes|array $attributes
|
||||
*
|
||||
* @return Element
|
||||
*/
|
||||
public function createElement($tag, $attributes = null)
|
||||
{
|
||||
$element = Element::create($tag, $attributes);
|
||||
$this->add($element);
|
||||
return $element;
|
||||
}
|
||||
|
||||
public function renderContent()
|
||||
{
|
||||
return parent::render();
|
||||
|
|
|
|||
Loading…
Reference in a new issue