Skip to content
Extraits de code Groupes Projets
Valider ce2d7d45 rédigé par mattab's avatar mattab
Parcourir les fichiers

Add hook in ReportsByDimension to let plugins modify the Reports listing

parent e7f25652
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -11,6 +11,7 @@
namespace Piwik\View;
use Piwik\FrontController;
use Piwik\Piwik;
use Piwik\Url;
use Piwik\View;
......@@ -25,11 +26,14 @@ class ReportsByDimension extends View
{
/**
* Constructor.
*
* @param string $id
*/
public function __construct()
public function __construct($id)
{
parent::__construct('@CoreHome/ReportsByDimension/_reportsByDimension');
$this->dimensionCategories = array();
$this->id = $id;
}
/**
......@@ -71,6 +75,14 @@ class ReportsByDimension extends View
}
}
/**
* @return string The ID specified in the constructor, usually the plugin name
*/
public function getId()
{
return $this->id;
}
/**
* Renders this view.
*
......@@ -78,6 +90,13 @@ class ReportsByDimension extends View
*/
public function render()
{
/**
* Use this hook to configure the "Report by dimension" UI controller. This controller is displayed for example
* in the Referrers>Overview and the Goals>Overview report. It displays a list of repotrs on the left, and when click
* loads the report on the right column. This hook can be used to filter this list of report. @see ReportsByDimension class for more info.
*/
Piwik::postEvent('View.ReportsByDimension.render', array($this));
$this->firstReport = "";
// if there are reports & report categories added, render the first one so we can
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter