public function addWidget($widgetIdent, $widget)
    {
        if (!is_string($widgetIdent)) {
            throw new InvalidArgumentException(
                'Widget identifier needs to be a string'
            );
        }

        if ($widget instanceof UiItemInterface) {
            $this->widgets[$widgetIdent] = $widget;
        } elseif (is_array($widget)) {
            if (!isset($widget['ident'])) {
                $widget['ident'] = $widgetIdent;
            }

            $w = $this->widgetBuilder->build($widget);

            $this->widgets[$widgetIdent] = $w;
        } else {
            throw new InvalidArgumentException(
                'Can not add widget: Invalid Widget.'
            );
        }

        return $this;
    }