Example #1
0
 /**
  * The constructor
  * @param int
  * @param Piwik_Date ($this->date from controller)
  */
 public function __construct($idSite, $date)
 {
     parent::__construct($idSite, $date);
     // extract multiple labels from the label parameter
     $this->labels = explode('<+MultiRow+>', html_entity_decode($this->label));
     if (count($this->labels) == 1) {
         throw new Exception("Expecting at least two labels.");
     }
     // get selected metric
     $this->metric = Piwik_Common::getRequestVar('metric', '', 'string');
     if (empty($this->metric)) {
         $this->metric = reset(array_keys($this->availableMetrics));
     }
 }
 /**
  * The constructor
  * @param int
  * @param Piwik_Date ($this->date from controller)
  */
 public function __construct($idSite, $date)
 {
     $this->metric = Piwik_Common::getRequestVar('column', '', 'string');
     parent::__construct($idSite, $date);
 }