Piwik\Plugin\Visualization::__construct PHP Method

__construct() final public method

final public __construct ( $controllerAction, $apiMethodToRequestDataTable, $params = [] )
    public final function __construct($controllerAction, $apiMethodToRequestDataTable, $params = array())
    {
        $templateFile = static::TEMPLATE_FILE;
        if (empty($templateFile)) {
            throw new \Exception('You have not defined a constant named TEMPLATE_FILE in your visualization class.');
        }
        $this->metricsFormatter = new HtmlFormatter();
        parent::__construct($controllerAction, $apiMethodToRequestDataTable, $params);
        $this->report = ReportsProvider::factory($this->requestConfig->getApiModuleToRequest(), $this->requestConfig->getApiMethodToRequest());
    }