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;
    }
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;
    }
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 ; }
Get all widgets defined in the Piwik platform.
@ignore
@return static
Get all widgets defined in the Piwik platform .