protected function defineReportWidgets()
    {
        if ($this->reportsDefined) {
            return;
        }

        $result = [];
        $widgets = $this->getWidgetsFromUserPreferences();

        foreach ($widgets as $alias => $widgetInfo) {
            if ($widget = $this->makeReportWidget($alias, $widgetInfo)) {
                $result[$alias] = $widget;
            }
        }

        uasort($result, function ($a, $b) {
            return $a['sortOrder'] - $b['sortOrder'];
        });

        $this->reportWidgets = $result;

        $this->reportsDefined = true;
    }
protected function defineReportWidgets()
    {
        if ($this->reportsDefined) {
            return;
        }

        $result = [];
        $widgets = $this->getWidgetsFromUserPreferences();

        foreach ($widgets as $alias => $widgetInfo) {
            if ($widget = $this->makeReportWidget($alias, $widgetInfo)) {
                $result[$alias] = $widget;
            }
        }

        uasort($result, function ($a, $b) {
            return $a['sortOrder'] - $b['sortOrder'];
        });

        $this->reportWidgets = $result;

        $this->reportsDefined = true;
    }
protected function defineReportWidgets ( ) { if ( $ this -> reportsDefined ) { return ; } $ result = [ ] ; $ widgets = $ this -> getWidgetsFromUserPreferences ( ) ; foreach ( $ widgets as $ alias => $ widgetInfo ) { if ( $ widget = $ this -> makeReportWidget ( $ alias , $ widgetInfo ) ) { $ result [ $ alias ] = $ widget ; } } uasort ( $ result , function ( $ a , $ b ) { return $ a [ 'sortOrder' ] - $ b [ 'sortOrder' ] ; } ) ; $ this -> reportWidgets = $ result ; $ this -> reportsDefined = true ; }
Registers the report widgets that will be included in this container.
The chosen widgets are based on the user preferences.
Registers the report widgets that will be included in this container . The chosen widgets are based on the user preferences .