diff --git a/views/widget.php b/views/widget.php index e1497c8..9bc55e1 100644 --- a/views/widget.php +++ b/views/widget.php @@ -93,7 +93,14 @@ BrowserAsset::register($this); JuiAsset::register($this); } - -echo Widget::widget([ - 'options'=> $options, -]); + +$params = []; +$reflector = new ReflectionClass(Widget::className()); +foreach($reflector->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { + $name = $property->name; + + if (isset(${$name})) { + $params[$name] = ${$name}; + } +} +echo Widget::widget($params);