Piwik\Widget\WidgetConfig::setModule PHP Method

setModule() public method

Set the module (aka plugin name) of the widget. The correct module is usually detected automatically and not needed to be configured manually.
public setModule ( string $module ) : static
$module string eg 'CoreHome'
return static
    public function setModule($module)
    {
        $this->module = $module;
        return $this;
    }

Usage Example

Example #1
0
 private function addDefaultDashboard(&$widgets)
 {
     $config = new WidgetConfig();
     $config->setIsNotWidgetizable();
     $config->setModule('Dashboard');
     $config->setAction('embeddedIndex');
     $config->setCategoryId('Dashboard_Dashboard');
     $config->setSubcategoryId('1');
     $config->setParameters(array('idDashboard' => 1));
     $widgets[] = $config;
 }
All Usage Examples Of Piwik\Widget\WidgetConfig::setModule