Ublaboo\DataGrid\DataGrid::addExportCsv PHP Method

addExportCsv() public method

Add already implemented csv export
public addExportCsv ( string $text, string $csv_file_name, string | null $output_encoding = NULL, string | null $delimiter = NULL, boolean $include_bom = FALSE ) : Export
$text string
$csv_file_name string
$output_encoding string | null
$delimiter string | null
$include_bom boolean
return Ublaboo\DataGrid\Export\Export
    public function addExportCsv($text, $csv_file_name, $output_encoding = NULL, $delimiter = NULL, $include_bom = FALSE)
    {
        return $this->addToExports(new Export\ExportCsv($this, $text, $csv_file_name, FALSE, $output_encoding, $delimiter, $include_bom));
    }

Usage Example

Exemplo n.º 1
0
 protected function createComponentGrid($name)
 {
     $grid = new DataGrid(NULL, $name);
     $grid->addExportCsv('export', 'export.csv');
     return $grid;
 }
DataGrid