public function makeWidget($class, $widgetConfig = [])
    {
        $controller = property_exists($this, 'controller') && $this->controller
            ? $this->controller
            : $this;

        if (!class_exists($class)) {
            throw new SystemException(Lang::get('backend::lang.widget.not_registered', [
                'name' => $class
            ]));
        }

        return new $class($controller, $widgetConfig);
    }
public function makeWidget($class, $widgetConfig = [])
    {
        $controller = property_exists($this, 'controller') && $this->controller
            ? $this->controller
            : $this;

        if (!class_exists($class)) {
            throw new SystemException(Lang::get('backend::lang.widget.not_registered', [
                'name' => $class
            ]));
        }

        return new $class($controller, $widgetConfig);
    }
public function makeWidget ( $ class , $ widgetConfig = [ ] ) { $ controller = property_exists ( $ this , 'controller' ) && $ this -> controller ? $ this -> controller : $ this ; if ( ! class_exists ( $ class ) ) { throw new SystemException ( Lang :: get ( 'backend::lang.widget.not_registered' , [ 'name' => $ class ] ) ) ; } return new $ class ( $ controller , $ widgetConfig ) ; }
Makes a widget object with the supplied configuration file.
@param string $class Widget class name
@param array $widgetConfig An array of config.
@return \Backend\Classes\WidgetBase The widget object
Makes a widget object with the supplied configuration file .