public function widgetRegistry(WidgetRegistry $instance = null, $widgets = [])
    {
        deprecationWarning('widgetRegistry is deprecated, use widgetLocator instead.');

        if ($instance) {
            $instance->add($widgets);
            $this->setWidgetLocator($instance);
        }

        return $this->getWidgetLocator();
    }