lib/components/web/widgets/Collector.php
public function build(Section $section = null, $widgetName, $instanceSettings = [])
    {
        if (is_object($widgetName)) {
            $widget = $widgetName;
        } else {
            $widget = $this->getOne($widgetName);
        }
        $widgetObject = $widget->object;
        if (is_null($widgetObject)) {
            return false;
        }
        if (isset($section)) {
            $widgetObject->attachDecorator($section->widgetDecoratorClass);
            $widgetObject->section = $section;
        }
        $widgetObject->owner = $widget->owner;
        Yii::configure($widgetObject, $instanceSettings);
        $cell = $widgetObject->cell;

        $this->lastBuildId = $widgetObject->getWidgetId();
        $this->producedWidgets[$widgetObject->widgetId] = ['widget' => $widgetObject->systemId, 'id' => $widgetObject->widgetId, 'params' => $widgetObject->recreateParams];

        return $cell;
    }
public function build(Section $section = null, $widgetName, $instanceSettings = [])
    {
        if (is_object($widgetName)) {
            $widget = $widgetName;
        } else {
            $widget = $this->getOne($widgetName);
        }
        $widgetObject = $widget->object;
        if (is_null($widgetObject)) {
            return false;
        }
        if (isset($section)) {
            $widgetObject->attachDecorator($section->widgetDecoratorClass);
            $widgetObject->section = $section;
        }
        $widgetObject->owner = $widget->owner;
        Yii::configure($widgetObject, $instanceSettings);
        $cell = $widgetObject->cell;

        $this->lastBuildId = $widgetObject->getWidgetId();
        $this->producedWidgets[$widgetObject->widgetId] = ['widget' => $widgetObject->systemId, 'id' => $widgetObject->widgetId, 'params' => $widgetObject->recreateParams];

        return $cell;
    }
public function build ( Section $ section = null , $ widgetName , $ instanceSettings = [ ] ) { if ( is_object ( $ widgetName ) ) { $ widget = $ widgetName ; } else { $ widget = $ this -> getOne ( $ widgetName ) ; } $ widgetObject = $ widget -> object ; if ( is_null ( $ widgetObject ) ) { return false ; } if ( isset ( $ section ) ) { $ widgetObject -> attachDecorator ( $ section -> widgetDecoratorClass ) ; $ widgetObject -> section = $ section ; } $ widgetObject -> owner = $ widget -> owner ; Yii :: configure ( $ widgetObject , $ instanceSettings ) ; $ cell = $ widgetObject -> cell ; $ this -> lastBuildId = $ widgetObject -> getWidgetId ( ) ; $ this -> producedWidgets [ $ widgetObject -> widgetId ] = [ 'widget' => $ widgetObject -> systemId , 'id' => $ widgetObject -> widgetId , 'params' => $ widgetObject -> recreateParams ] ; return $ cell ; }
[[@doctodo method_description:build]].

@param cascade\components\web\widgets\section\Section $section          [[@doctodo param_description:section]]
@param [[@doctodo param_type:widgetName]]             $widgetName       [[@doctodo param_description:widgetName]]
@param array                                          $instanceSettings [[@doctodo param_description:instanceSettings]] [optional]

@return [[@doctodo return_type:build]] [[@doctodo return_description:build]]
[[ @doctodo method_description : build ]] .