*/
protected $children = array();
/**
* @param class-string<\YahnisElsts\AdminMenuEditor\Customizable\Controls\Container> $containerClass
* @param string $title
*/
protected function __construct($containerClass, $title, $children = array()) {
parent::__construct($containerClass);
$this->title = $title;
$this->children = $children;
}
/**
* @return UiElement[]
*/
protected function buildChildren() {
return self::buildItems($this->children);
}
public function build() {
$className = $this->elementClass;
return new $className($this->title, $this->buildChildren(), $this->params);
}
/**
* @param ElementBuilder|UiElement ...$children
* @return $this
*/
public function add(...$children) {
return $this->addAll($children);
}
/**
* @param array