original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Registers the report widgets that will be included in this container.
  The chosen widgets are based on the user preferences.
docstring_tokens: Registers the report widgets that will be included in this container . The chosen widgets are based on the user preferences .