original_string: public function listReportWidgets()
      {
          if ($this->reportWidgets === null) {
              $this->reportWidgets = [];
  
              /*
               * Load module widgets
               */
              foreach ($this->reportWidgetCallbacks as $callback) {
                  $callback($this);
              }
  
              /*
               * Load plugin widgets
               */
              $plugins = $this->pluginManager->getPlugins();
  
              foreach ($plugins as $plugin) {
                  if (!is_array($widgets = $plugin->registerReportWidgets())) {
                      continue;
                  }
  
                  foreach ($widgets as $className => $widgetInfo) {
                      $this->registerReportWidget($className, $widgetInfo);
                  }
              }
          }
  
          /**
           * @event system.reportwidgets.extendItems
           * Enables adding or removing report widgets.
           *
           * You will have access to the WidgetManager instance and be able to call the appropiate methods
           * $manager->registerReportWidget();
           * $manager->removeReportWidget();
           *
           * Example usage:
           *
           *     Event::listen('system.reportwidgets.extendItems', function($manager) {
           *          $manager->removeReportWidget('Acme\ReportWidgets\YourWidget');
           *     });
           *
           */
          Event::fire('system.reportwidgets.extendItems', [$this]);
  
          return $this->reportWidgets;
      }
code: public function listReportWidgets()
      {
          if ($this->reportWidgets === null) {
              $this->reportWidgets = [];
  
              /*
               * Load module widgets
               */
              foreach ($this->reportWidgetCallbacks as $callback) {
                  $callback($this);
              }
  
              /*
               * Load plugin widgets
               */
              $plugins = $this->pluginManager->getPlugins();
  
              foreach ($plugins as $plugin) {
                  if (!is_array($widgets = $plugin->registerReportWidgets())) {
                      continue;
                  }
  
                  foreach ($widgets as $className => $widgetInfo) {
                      $this->registerReportWidget($className, $widgetInfo);
                  }
              }
          }
  
          /**
           * @event system.reportwidgets.extendItems
           * Enables adding or removing report widgets.
           *
           * You will have access to the WidgetManager instance and be able to call the appropiate methods
           * $manager->registerReportWidget();
           * $manager->removeReportWidget();
           *
           * Example usage:
           *
           *     Event::listen('system.reportwidgets.extendItems', function($manager) {
           *          $manager->removeReportWidget('Acme\ReportWidgets\YourWidget');
           *     });
           *
           */
          Event::fire('system.reportwidgets.extendItems', [$this]);
  
          return $this->reportWidgets;
      }
code_tokens: public function listReportWidgets ( ) { if ( $ this -> reportWidgets === null ) { $ this -> reportWidgets = [ ] ; /*
               * Load module widgets
               */ foreach ( $ this -> reportWidgetCallbacks as $ callback ) { $ callback ( $ this ) ; } /*
               * Load plugin widgets
               */ $ plugins = $ this -> pluginManager -> getPlugins ( ) ; foreach ( $ plugins as $ plugin ) { if ( ! is_array ( $ widgets = $ plugin -> registerReportWidgets ( ) ) ) { continue ; } foreach ( $ widgets as $ className => $ widgetInfo ) { $ this -> registerReportWidget ( $ className , $ widgetInfo ) ; } } } /**
           * @event system.reportwidgets.extendItems
           * Enables adding or removing report widgets.
           *
           * You will have access to the WidgetManager instance and be able to call the appropiate methods
           * $manager->registerReportWidget();
           * $manager->removeReportWidget();
           *
           * Example usage:
           *
           *     Event::listen('system.reportwidgets.extendItems', function($manager) {
           *          $manager->removeReportWidget('Acme\ReportWidgets\YourWidget');
           *     });
           *
           */ Event :: fire ( 'system.reportwidgets.extendItems' , [ $ this ] ) ; return $ this -> reportWidgets ; }
docstring: Returns a list of registered report widgets.
  @return array Array keys are class names.
docstring_tokens: Returns a list of registered report widgets .