original_string: public static function get()
      {
          $list = new static;
  
          $widgets = StaticContainer::get('Piwik\Plugin\WidgetsProvider');
  
          $widgetContainerConfigs = $widgets->getWidgetContainerConfigs();
          foreach ($widgetContainerConfigs as $config) {
              if ($config->isEnabled()) {
                  $list->addWidgetConfig($config);
              }
          }
  
          $widgetConfigs = $widgets->getWidgetConfigs();
          foreach ($widgetConfigs as $widget) {
              if ($widget->isEnabled()) {
                  $list->addWidgetConfig($widget);
              }
          }
  
          $reports = StaticContainer::get('Piwik\Plugin\ReportsProvider');
          $reports = $reports->getAllReports();
          foreach ($reports as $report) {
              if ($report->isEnabled()) {
                  $factory = new ReportWidgetFactory($report);
                  $report->configureWidgets($list, $factory);
              }
          }
  
          /**
           * Triggered to filter widgets.
           *
           * **Example**
           *
           *     public function removeWidgetConfigs(Piwik\Widget\WidgetsList $list)
           *     {
           *         $list->remove($category='General_Visits'); // remove all widgets having this category
           *     }
           *
           * @param WidgetsList $list An instance of the WidgetsList. You can change the list of widgets this way.
           */
          Piwik::postEvent('Widget.filterWidgets', array($list));
  
          return $list;
      }
code: public static function get()
      {
          $list = new static;
  
          $widgets = StaticContainer::get('Piwik\Plugin\WidgetsProvider');
  
          $widgetContainerConfigs = $widgets->getWidgetContainerConfigs();
          foreach ($widgetContainerConfigs as $config) {
              if ($config->isEnabled()) {
                  $list->addWidgetConfig($config);
              }
          }
  
          $widgetConfigs = $widgets->getWidgetConfigs();
          foreach ($widgetConfigs as $widget) {
              if ($widget->isEnabled()) {
                  $list->addWidgetConfig($widget);
              }
          }
  
          $reports = StaticContainer::get('Piwik\Plugin\ReportsProvider');
          $reports = $reports->getAllReports();
          foreach ($reports as $report) {
              if ($report->isEnabled()) {
                  $factory = new ReportWidgetFactory($report);
                  $report->configureWidgets($list, $factory);
              }
          }
  
          /**
           * Triggered to filter widgets.
           *
           * **Example**
           *
           *     public function removeWidgetConfigs(Piwik\Widget\WidgetsList $list)
           *     {
           *         $list->remove($category='General_Visits'); // remove all widgets having this category
           *     }
           *
           * @param WidgetsList $list An instance of the WidgetsList. You can change the list of widgets this way.
           */
          Piwik::postEvent('Widget.filterWidgets', array($list));
  
          return $list;
      }
code_tokens: public static function get ( ) { $ list = new static ; $ widgets = StaticContainer :: get ( 'Piwik\Plugin\WidgetsProvider' ) ; $ widgetContainerConfigs = $ widgets -> getWidgetContainerConfigs ( ) ; foreach ( $ widgetContainerConfigs as $ config ) { if ( $ config -> isEnabled ( ) ) { $ list -> addWidgetConfig ( $ config ) ; } } $ widgetConfigs = $ widgets -> getWidgetConfigs ( ) ; foreach ( $ widgetConfigs as $ widget ) { if ( $ widget -> isEnabled ( ) ) { $ list -> addWidgetConfig ( $ widget ) ; } } $ reports = StaticContainer :: get ( 'Piwik\Plugin\ReportsProvider' ) ; $ reports = $ reports -> getAllReports ( ) ; foreach ( $ reports as $ report ) { if ( $ report -> isEnabled ( ) ) { $ factory = new ReportWidgetFactory ( $ report ) ; $ report -> configureWidgets ( $ list , $ factory ) ; } } /**
           * Triggered to filter widgets.
           *
           * **Example**
           *
           *     public function removeWidgetConfigs(Piwik\Widget\WidgetsList $list)
           *     {
           *         $list->remove($category='General_Visits'); // remove all widgets having this category
           *     }
           *
           * @param WidgetsList $list An instance of the WidgetsList. You can change the list of widgets this way.
           */ Piwik :: postEvent ( 'Widget.filterWidgets' , array ( $ list ) ) ; return $ list ; }
docstring: Get all widgets defined in the Piwik platform.
  @ignore
  @return static
docstring_tokens: Get all widgets defined in the Piwik platform .