프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$columns_dict | array | dictionary value: column name as in extensions/ki_export/templates/scripts/main.php key: true if active, else false | |
$customTimeformat | string | strftime format string for fields of type time | |
$exportData_arr | array | the data rows to be exported | |
$kga | array | Kimai Global Array |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$COLUMN_CONFIG | array | Column configuration:
|
|
$activeColumns_arr | array | contains names (as in $this->columns_dict) of active columns | |
$anySumsWereAdded | boolean | true, if there are any active columns with sums, else false | |
$dateFormat | string | excel format string for fields of type date | |
$sheet | PHPExcel_Worksheet | the first (and only) worksheet | |
$timeFormat | string | excel format string for fields of type time |
메소드 | 설명 | |
---|---|---|
render ( array $kga, array $exportData_arr, array $columns_dict, string $customTimeformat ) | generates an .xlsx file containing time sheets to be exported the file will be sent to the browser for download/viewing |
메소드 | 설명 | |
---|---|---|
addCellBorders ( ) | add cell borders | |
doLayouting ( ) | do layouting (cell borders, font styles, background colors, cell sizing, page setup) | |
excelAddr ( integer $x, integer $y ) : string | get excel field address by supplying coordinates (e.g. '1/1' becomes 'B2') | |
excelColumnAddr ( integer $n ) : string | get excel column letter by index (e.g. '2' becomes 'C') using this over PHPExcels built-in methods, because they are partly 1-based instead of 0-based | |
excelRange ( $x1, $y1, $x2, $y2 ) : string | get excel field range by supplying coordinates | |
formatDataRowsByType ( ) | cell formatting (number/text/date . | |
formatHeaders ( ) | format the headers (additional cell borders, background color, alignment) | |
formatSums ( ) | format the sums row if there are any sums (borders and background color) | |
initialize ( ) | initial PHPExcel settings; build $this->activeColumns_arr | |
renderExcel ( ) | renders the excel and sends it to the browser | |
writeDataRows ( ) | write the data rows for all active columns | |
writeHeaders ( ) | write the headers for all active columns | |
writeSums ( ) | write sums for active columns only if configured in self::$COLUMN_CONFIG |
protected doLayouting ( ) |
protected static excelColumnAddr ( integer $n ) : string | ||
$n | integer | column index |
리턴 | string | excel column letter |
protected static excelRange ( $x1, $y1, $x2, $y2 ) : string | ||
리턴 | string | excel field range |
protected formatDataRowsByType ( ) |
protected formatHeaders ( ) |
protected formatSums ( ) |
protected initialize ( ) |
public render ( array $kga, array $exportData_arr, array $columns_dict, string $customTimeformat ) | ||
$kga | array | Kimai Global Array |
$exportData_arr | array | the data rows to be exported |
$columns_dict | array | dictionary of columns: column name => active (true/false) |
$customTimeformat | string | strftime format string for fields of type time (for dates $this->kga['conf']['date_format_1'] will be used) |
protected writeSums ( ) |
protected static array $COLUMN_CONFIG | ||
리턴 | array |
protected array $activeColumns_arr | ||
리턴 | array |
protected bool $anySumsWereAdded | ||
리턴 | boolean |
public array $columns_dict | ||
리턴 | array |
public string $customTimeformat | ||
리턴 | string |
protected string $dateFormat | ||
리턴 | string |
protected PHPExcel_Worksheet $sheet | ||
리턴 | PHPExcel_Worksheet |
protected string $timeFormat | ||
리턴 | string |