PHP Class Nayjest\Grids\Components\ExcelExport

The component provides control for exporting data to excel.
Author: : Alexander Hofmeister
Inheritance: extends Nayjest\Grids\Components\Base\RenderableComponent
Show file Open project: nayjest/grids

Protected Properties

Property Type Description
$extension
$fileName string
$ignored_columns
$is_hidden_columns_exported
$name
$on_file_create
$on_sheet_create
$output string
$render_section
$rows_limit
$sheetName string
$template

Public Methods

Method Description
getData ( ) : array
getExtension ( ) : string
getFileName ( ) : string Returns name of exported file.
getIgnoredColumns ( ) : string[]
getOnFileCreate ( ) : mixed
getOnSheetCreate ( ) : callable
getRowsLimit ( ) : integer
getSheetName ( ) : string
initialize ( Nayjest\Grids\Grid $grid ) : null | void
isHiddenColumnsExported ( ) : boolean
setExtension ( string $name )
setFileName ( string $name ) Sets name of exported file.
setHiddenColumnsExported ( boolean $isHiddenColumnsExported )
setIgnoredColumns ( array $ignoredColumns )
setOnFileCreate ( callable $onFileCreate )
setOnSheetCreate ( callable $onSheetCreate )
setRowsLimit ( integer $limit )
setSheetName ( string $name )

Protected Methods

Method Description
escapeString ( $str )
getHeaderRow ( )
isColumnExported ( Nayjest\Grids\FieldConfig $column ) : boolean
renderExcel ( )
resetPagination ( Nayjest\Grids\DataProvider $provider )

Method Details

escapeString() protected method

protected escapeString ( $str )

getData() public method

public getData ( ) : array
return array

getExtension() public method

public getExtension ( ) : string
return string

getFileName() public method

Returns name of exported file.
public getFileName ( ) : string
return string

getHeaderRow() protected method

protected getHeaderRow ( )

getIgnoredColumns() public method

public getIgnoredColumns ( ) : string[]
return string[]

getOnFileCreate() public method

public getOnFileCreate ( ) : mixed
return mixed

getOnSheetCreate() public method

public getOnSheetCreate ( ) : callable
return callable

getRowsLimit() public method

public getRowsLimit ( ) : integer
return integer

getSheetName() public method

public getSheetName ( ) : string
return string

initialize() public method

public initialize ( Nayjest\Grids\Grid $grid ) : null | void
$grid Nayjest\Grids\Grid
return null | void

isColumnExported() protected method

protected isColumnExported ( Nayjest\Grids\FieldConfig $column ) : boolean
$column Nayjest\Grids\FieldConfig
return boolean

isHiddenColumnsExported() public method

renderExcel() protected method

protected renderExcel ( )

resetPagination() protected method

protected resetPagination ( Nayjest\Grids\DataProvider $provider )
$provider Nayjest\Grids\DataProvider

setExtension() public method

public setExtension ( string $name )
$name string

setFileName() public method

Sets name of exported file.
public setFileName ( string $name )
$name string

setHiddenColumnsExported() public method

public setHiddenColumnsExported ( boolean $isHiddenColumnsExported )
$isHiddenColumnsExported boolean

setIgnoredColumns() public method

public setIgnoredColumns ( array $ignoredColumns )
$ignoredColumns array

setOnFileCreate() public method

public setOnFileCreate ( callable $onFileCreate )
$onFileCreate callable

setOnSheetCreate() public method

public setOnSheetCreate ( callable $onSheetCreate )
$onSheetCreate callable

setRowsLimit() public method

public setRowsLimit ( integer $limit )
$limit integer

setSheetName() public method

public setSheetName ( string $name )
$name string

Property Details

$extension protected property

protected $extension

$fileName protected property

protected string $fileName
return string

$ignored_columns protected property

protected $ignored_columns

$is_hidden_columns_exported protected property

protected $is_hidden_columns_exported

$name protected property

protected $name

$on_file_create protected property

protected $on_file_create

$on_sheet_create protected property

protected $on_sheet_create

$output protected property

protected string $output
return string

$render_section protected property

protected $render_section

$rows_limit protected property

protected $rows_limit

$sheetName protected property

protected string $sheetName
return string

$template protected property

protected $template