public function filter($table) { foreach ($table->getRows() as $row) { $typeReferrer = $row->getColumn('label'); if ($typeReferrer != Common::REFERRER_TYPE_DIRECT_ENTRY) { if (!$this->expanded) { $row->setNonLoadedSubtableId($typeReferrer); } else { if (!Range::isMultiplePeriod($this->date, $this->period)) { // otherwise, we have to get the other datatables // NOTE: not yet possible to do this w/ DataTable\Map instances // (actually it would be maybe possible by using $map->mergeChildren() or so build it would be slow) $subtable = API::getInstance()->getReferrerType($this->idSite, $this->period, $this->date, $this->segment, $type = false, $idSubtable = $typeReferrer); if ($this->expanded) { $subtable->applyQueuedFilters(); } $row->setSubtable($subtable); } } } } }