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();
    }
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();
    }
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 ( ) ; }
Set the widget registry the helper will use.

@param \Cake\View\Widget\WidgetRegistry|null $instance The registry instance to set.
@param array $widgets An array of widgets
@return \Cake\View\Widget\WidgetRegistry
@deprecated 3.6.0 Use FormHelper::widgetLocator() instead.
Set the widget registry the helper will use .