Piwik\DataTable::setTableSortedBy PHP Метод

setTableSortedBy() публичный Метод

public setTableSortedBy ( $column )
    public function setTableSortedBy($column)
    {
        $this->indexNotUpToDate = true;
        $this->tableSortedBy = $column;
    }

Usage Example

Пример #1
0
 /**
  * API method that returns number of visits based on hour parity.
  * @param int    $idSite
  * @param string $period
  * @param string $date
  * @param bool|string $segment
  * @return DataTable
  */
 public function getEvenUnevenTimes($idSite, $period, $date, $segment = false)
 {
     $archive = Archive::build($idSite, $period, $date);
     $oddHoursCount = $archive->getNumeric(Archiver::ODD_HOURS_COUNT_RECORD_NAME);
     $evenHoursCount = $archive->getNumeric(Archiver::EVEN_HOURS_COUNT_RECORD_NAME);
     $table = new DataTable();
     $table->setTableSortedBy('times');
     $table->addRowFromArray(array(Row::COLUMNS => array('times' => Piwik::translate('HourParity_Oddhours'), 'nb_visits' => $oddHoursCount)));
     $table->addRowFromArray(array(Row::COLUMNS => array('times' => Piwik::translate('HourParity_Evenhours'), 'nb_visits' => $evenHoursCount)));
     return $table;
 }
All Usage Examples Of Piwik\DataTable::setTableSortedBy