PHP Class kartik\export\ExportMenu

Since: 1.0
Author: Kartik Visweswaran ([email protected])
Inheritance: extends kartik\grid\GridView, use trait kartik\base\TranslationTrait
Datei anzeigen Open project: kartik-v/yii2-export Class Usage Examples

Public Properties

Property Type Description
$afterSaveView the view file to show details of exported file link. This property will be validated only when $stream is false and streamAfterSave is false. You can set this to false to not display any file link details for view. This defaults to the _view PHP file in the views folder of the extension.
$asDropdown whether to render the export menu as bootstrap button dropdown widget. Defaults to true. If set to false, this will generate a simple HTML list of links.
$autoWidth whether to auto-size the excel output column widths. Defaults to true.
$batchSize fetch models from the dataprovider using batches of this size. Set this to 0 (the default) to disable. If $dataProvider does not have a pagination object, this parameter is ignored. Setting this property helps reduce memory overflow issues by allowing parsing of models in batches, rather than fetching all models in one go.
$clearBuffers whether to clear all previous / parent buffers. Defaults to false.
$columnBatchToggleSettings the settings for the toggle all checkbox to check / uncheck the columns as a batch. Should be setup as an associative array which can have the following keys: - show: bool, whether the batch toggle checkbox is to be shown. Defaults to true. - label: string, the label to be displayed for toggle all. Defaults to Toggle All. - options: array, the HTML attributes for the toggle label text. Defaults to ['class'=>'kv-toggle-all']
$columnSelector the configuration of the column names in the column selector. Note: column names will be generated automatically by default. Any setting in this property will override the auto-generated column names. This list should be setup as $key => $value where: $key: int, is the zero based index of the column as set in $columns. $value: string, is the column name/label you wish to display in the column selector.
$columnSelectorMenuOptions the HTML attributes for the column selector menu list.
$columnSelectorOptions the HTML attributes for the column selector dropdown button. The following special options are recognized: - label: string, defaults to empty string. - icon: string, defaults to - title: string, defaults to Select columns for export.
$container
$contentAfter an array of rows to append after the footer row. Each array should be set with the following settings: - value: string, the value of the merged row - styleOptions: array, array of configuration options to set the style. See $styleOptions on how to configure.
$contentBefore an array of rows to prepend in front of the grid used to create things like a title. Each array should be set with the following settings: - value: string, the value of the merged row - styleOptions: array, array of configuration options to set the style. See $styleOptions on how to configure.
$deleteAfterSave whether to delete file after saving file to $folder and when $stream is false. This property will be validated only when $stream is false. This property is useful only if streamAfterSave is true.
$disabledColumns the column indexes for export that will be disabled for selection in the column selector.
$docProperties the PHPExcel document properties
$dropdownOptions the HTML attributes for the export button menu. Applicable only if asDropdown is set to true. The following special options are available: - label: string, defaults to empty string - icon: string, defaults to - title: string, defaults to Export data in selected format. - menuOptions: array, the HTML attributes for the dropdown menu. - itemsBefore: array, any additional items that will be merged/prepended before with the export dropdown list. This should be similar to the items property as supported by \yii\bootstrap\ButtonDropdown widget. Note the page export items will be automatically generated based on settings in the exportConfig property. - itemsAfter: array, any additional items that will be merged/appended after with the export dropdown list. This should be similar to the items property as supported by \yii\bootstrap\ButtonDropdown widget. Note the page export items will be automatically generated based on settings in the exportConfig property.
$dynagrid enable dynagrid for column selection. If set to true the inbuilt export menu column selector functionality will be disabled and not rendered.
$dynagridOptions dynagrid widget options
$enableFormatter whether to enable the yii gridview formatter component. Defaults to true. If set to false, this will render content as raw format.
$encoding encoding for the downloaded file header. Defaults to 'utf-8'.
$exportColumnsView the view file for rendering the columns selection
$exportConfig the export configuration. The array keys must be the one of the format constants (CSV, HTML, TEXT, EXCEL, PDF) and the array value is a configuration array consisting of these settings: - label: string, the label for the export format menu item displayed - icon: string, the glyphicon or font-awesome name suffix to be displayed before the export menu item label. If set to an empty string, this will not be displayed. - iconOptions: array, HTML attributes for export menu icon. - linkOptions: array, HTML attributes for each export item link. - filename: the base file name for the generated file. Defaults to 'grid-export'. This will be used to generate a default file name for downloading. - extension: the extension for the file name - alertMsg: string, the message prompt to show before saving. If this is empty or not set it will not be displayed. - mime: string, the mime type (for the file format) to be set before downloading. - writer: string, the PHP Excel writer type - options: array, HTML attributes for the export menu item.
$exportFormOptions the HTML attributes for the export form.
$exportFormView the view file for rendering the export form
$exportRequestParam the request parameter ($_GET or $_POST) that will be submitted during export. If not set this will be auto generated. This should be unique for each export menu widget (for multiple export menu widgets on same page).
$filename the exported output file name. Defaults to 'grid-export';
$folder the folder to save the exported file. Defaults to '@webroot/tmp/'. This property will be parsed only if stream is false. If the specified folder does not exist, files will be saved to @webroot.
$fontAwesome whether to use font awesome icons for rendering the icons as defined in exportConfig. If set to true, you must load the FontAwesome CSS separately in your application.
$groupedRowStyle the default style configuration
$hiddenColumns the column indexes for export that will be hidden for selection in the column selector, but will still be displayed in export output.
$i18n the internalization configuration for this widget
$initProvider whether to initialize data provider and clear models before rendering. Defaults to false.
$krajeeDialogSettings configuration settings for the Krajee dialog widget that will be used to render alerts and confirmation dialog prompts
$linkPath the web accessible path for the saved file location. This property will be parsed only if stream is false. Note the afterSaveView property that will render the displayed file link.
$messages
$noExportColumns the column indexes for export that will not be exported at all nor will they be shown in the column selector
$onInitExcel the callback function on initializing the PHP Excel library. The anonymous function should have the following signature: php function ($excel, $grid) where: - $excel: the PHPExcel object instance - $grid: the GridView object
$onInitSheet the callback function to be executed on initializing the active sheet. The anonymous function should have the following signature: php function ($sheet, $grid) where: - $sheet: PHPExcel_Worksheet, the PHPExcel_Worksheet object instance - $grid: GridView, the current GridView object
$onInitWriter the callback function on initializing the writer. The anonymous function should have the following signature: php function ($writer, $grid) where: - $writer: PHPExcel_Writer_Abstract, the PHPExcel_Writer_Abstract object instance - $grid: GridView, the current GridView object
$onRenderDataCell the callback function to be executed on rendering each body data cell content. The anonymous function should have the following signature: php function ($cell, $content, $model, $key, $index, $grid) where: - $cell: PHPExcel_Cell, the current PHPExcel cell being rendered - $content: string, the data cell content being rendered - $model: Model, the data model to be rendered - $key: mixed, the key associated with the data model - $index: int, the zero-based index of the data model among the model array returned by [[dataProvider]]. - $grid: GridView, the current GridView object
$onRenderFooterCell the callback function to be executed on rendering the footer cell output content. The anonymous function should have the following signature: php function ($cell, $content, $grid) where: - $sheet: PHPExcel_Worksheet, the PHPExcel_Worksheet object instance - $content: string, the footer cell content being rendered - $grid: GridView, the current GridView object
$onRenderHeaderCell the callback function to be executed on rendering the header cell output content. The anonymous function should have the following signature: php function ($cell, $content, $grid) where: - $cell: PHPExcel_Cell, is the current PHPExcel cell being rendered - $content: string, is the header cell content being rendered - $grid: GridView, the current GridView object
$onRenderSheet the callback function to be executed on rendering the sheet. The anonymous function should have the following signature: php function ($sheet, $grid) where: - $sheet: PHPExcel_Worksheet, the PHPExcel_Worksheet object instance - $grid: GridView, the current GridView object
$pdfLibrary the library used to render the PDF. Defaults to 'mPDF'. Must be one of: - PHPExcel_Settings::PDF_RENDERER_TCPDF or 'tcPDF' - PHPExcel_Settings::PDF_RENDERER_DOMPDF or 'DomPDF' - PHPExcel_Settings::PDF_RENDERER_MPDF or 'mPDF'
$pdfLibraryPath the alias for the pdf library path to export to PDF
$pjaxContainerId the pjax container identifier inside which this menu is being rendered. If set the jQuery export menu plugin will get auto initialized on pjax request completion.
$selectedColumns the selected column indexes for export. If not set this will default to all columns.
$showColumnSelector whether to show a column selector to select columns for export. Defaults to true.
$showConfirmAlert whether to show a confirmation alert dialog before download. This confirmation dialog will notify user about the type of exported file for download and to disable popup blockers. Defaults to true.
$stream whether to stream output to the browser.
$streamAfterSave whether to stream after saving file to $folder and when $stream is false. This property will be validated only when $stream is false.
$styleOptions the output style configuration options. It must be the style configuration array as required by PHPExcel.
$target the target for submitting the export form, which will trigger the download of the exported file. Must be one of the TARGET_ constants. Defaults to ExportMenu::TARGET_POPUP. Note if you set stream and streamAfterSave to false, then this will be overridden to _self.
$template
$timeout timeout for the export function (in seconds), if timeout is < 0, the default PHP timeout will be used.

Protected Properties

Property Type Description
$_beginRow the table beginning row
$_columnSelectorEnabled whether the column selector is enabled
$_defaultExportConfig the default export configuration
$_defaultStyleOptions the default style configuration
$_doNotStream flag to identify if no streaming of file is desired
$_endCol the current table end column
$_endRow the current table end row
$_exportType the data output format type. Defaults to ExportMenu::FORMAT_EXCEL_X.
$_groupedColumn columns to be grouped
$_groupedRow grouped row values
$_headerBeginRow the header beginning row
$_msgCat translation message file category name for i18n
$_objPHPExcel object instance
$_objPHPExcelSheet object instance
$_objPHPExcelWriter object instance
$_provider the modified data provider for usage with export.
$_triggerDownload flag to identify if download is triggered
$_visibleColumns the visble columns for export

Public Methods

Method Description
columnName ( integer $index ) : string Returns an excel column name.
destroyPHPExcel ( ) : void Destroys PHP Excel Object Instance
generateAfterContent ( $row ) : void Generates the after content at the bottom of the exported sheet
generateBeforeContent ( ) : void Generates the before content at the top of the exported sheet
generateBody ( ) : integer Generates the output data body content.
generateFooter ( ) Generates the output footer row after a specific row number
generateHeader ( ) : void Generates the output data header content.
generateRow ( mixed $model, mixed $key, integer $index ) : void Generates an output data row with the given data model and key.
getColumnHeader ( DataColumn $col ) : string Gets the column header content
getPHPExcel ( ) : PHPExcel Gets the PHP Excel object
getPHPExcelSheet ( ) : PHPExcel_Worksheet Gets the PHP Excel sheet object
getPHPExcelWriter ( ) : PHPExcel_Writer_Abstrac\PHPExcel_Writer_Abstract Gets the PHP Excel writer object
getVisibleColumns ( ) : array Gets the visible columns for export
init ( )
initExport ( ) : void Initializes export settings
initPHPExcel ( ) : void Initializes PHP Excel Object Instance
initPHPExcelSheet ( ) : void Initializes PHP Excel Worksheet Instance
initPHPExcelWriter ( string $type ) : void Initializes PHP Excel Writer Object Instance
renderColumnSelector ( ) : string Renders the columns selector
renderExportMenu ( ) : string Renders the export menu
run ( )
setPHPExcel ( $obj ) Sets the PHP Excel object
setPHPExcelSheet ( $obj ) Sets the PHP Excel sheet object
setPHPExcelWriter ( $obj ) Sets the PHP Excel writer object
slash ( string $path, string $s = DIRECTORY_SEPARATOR ) : string Appends slash to path if it does not exist

Protected Methods

Method Description
checkGroupedRow ( Model | array $model, Model | array $nextModel, integer $key, integer $index ) : void
clearOutputBuffers ( ) : void Clear output buffers
findGroupedColumn ( ) Search all groupable columns
generateGroupedRow ( array $groupFooter, integer $groupedCol ) Generate a grouped row
getAttributeLabel ( string $attribute ) : string Generates the attribute label
getColumnLabel ( integer $key, Column $column ) : string Fetches the column label
initColumnSelector ( ) : void Initialize column selector list
initSelectedColumns ( ) : void Initialize columns selected for export
raiseEvent ( string $event, array $params ) : void Raises a callable event
registerAssets ( ) : void Registers client assets needed for Export Menu widget
setDefaultExportConfig ( ) : void Sets the default export configuration
setHttpHeaders ( ) : void Set HTTP headers for download
setVisibleColumns ( ) : void Sets visible columns for export

Method Details

checkGroupedRow() protected method

protected checkGroupedRow ( Model | array $model, Model | array $nextModel, integer $key, integer $index ) : void
$model yii\base\Model | array the data model
$nextModel yii\base\Model | array the next data model
$key integer the key associated with the data model
$index integer the zero-based index of the data model among the model array returned by [[dataProvider]].
return void

clearOutputBuffers() protected method

Clear output buffers
protected clearOutputBuffers ( ) : void
return void

columnName() public static method

Returns an excel column name.
public static columnName ( integer $index ) : string
$index integer the column index number
return string

destroyPHPExcel() public method

Destroys PHP Excel Object Instance
public destroyPHPExcel ( ) : void
return void

findGroupedColumn() protected method

Search all groupable columns
protected findGroupedColumn ( )

generateAfterContent() public method

Generates the after content at the bottom of the exported sheet
public generateAfterContent ( $row ) : void
return void

generateBeforeContent() public method

Generates the before content at the top of the exported sheet
public generateBeforeContent ( ) : void
return void

generateBody() public method

Generates the output data body content.
public generateBody ( ) : integer
return integer the number of output rows.

generateFooter() public method

Generates the output footer row after a specific row number
public generateFooter ( )

generateGroupedRow() protected method

Generate a grouped row
protected generateGroupedRow ( array $groupFooter, integer $groupedCol )
$groupFooter array footer row
$groupedCol integer the zero-based index of grouped column

generateHeader() public method

Generates the output data header content.
public generateHeader ( ) : void
return void

generateRow() public method

Generates an output data row with the given data model and key.
public generateRow ( mixed $model, mixed $key, integer $index ) : void
$model mixed the data model to be rendered
$key mixed the key associated with the data model
$index integer the zero-based index of the data model among the model array returned by [[dataProvider]].
return void

getAttributeLabel() protected method

Generates the attribute label
protected getAttributeLabel ( string $attribute ) : string
$attribute string
return string

getColumnHeader() public method

Gets the column header content
public getColumnHeader ( DataColumn $col ) : string
$col yii\grid\DataColumn
return string

getColumnLabel() protected method

Fetches the column label
protected getColumnLabel ( integer $key, Column $column ) : string
$key integer
$column yii\grid\Column
return string

getPHPExcel() public method

Gets the PHP Excel object
public getPHPExcel ( ) : PHPExcel
return PHPExcel the current PHPExcel object instance

getPHPExcelSheet() public method

Gets the PHP Excel sheet object
public getPHPExcelSheet ( ) : PHPExcel_Worksheet
return PHPExcel_Worksheet the current PHPExcel_Worksheet object instance

getPHPExcelWriter() public method

Gets the PHP Excel writer object
public getPHPExcelWriter ( ) : PHPExcel_Writer_Abstrac\PHPExcel_Writer_Abstract
return PHPExcel_Writer_Abstrac\PHPExcel_Writer_Abstract the current PHPExcel_Writer_Abstract object instance

getVisibleColumns() public method

Gets the visible columns for export
public getVisibleColumns ( ) : array
return array the columns configuration

init() public method

public init ( )

initColumnSelector() protected method

Initialize column selector list
protected initColumnSelector ( ) : void
return void

initExport() public method

Initializes export settings
public initExport ( ) : void
return void

initPHPExcel() public method

Initializes PHP Excel Object Instance
public initPHPExcel ( ) : void
return void

initPHPExcelSheet() public method

Initializes PHP Excel Worksheet Instance
public initPHPExcelSheet ( ) : void
return void

initPHPExcelWriter() public method

Initializes PHP Excel Writer Object Instance
public initPHPExcelWriter ( string $type ) : void
$type string the writer type as set in export config
return void

initSelectedColumns() protected method

Initialize columns selected for export
protected initSelectedColumns ( ) : void
return void

raiseEvent() protected method

Raises a callable event
protected raiseEvent ( string $event, array $params ) : void
$event string the event name
$params array the parameters to the callable function
return void

registerAssets() protected method

Registers client assets needed for Export Menu widget
protected registerAssets ( ) : void
return void

renderColumnSelector() public method

Renders the columns selector
public renderColumnSelector ( ) : string
return string the column selector markup

renderExportMenu() public method

Renders the export menu
public renderExportMenu ( ) : string
return string the export menu markup

run() public method

public run ( )

setDefaultExportConfig() protected method

Sets the default export configuration
protected setDefaultExportConfig ( ) : void
return void

setHttpHeaders() protected method

Set HTTP headers for download
protected setHttpHeaders ( ) : void
return void

setPHPExcel() public method

Sets the PHP Excel object
public setPHPExcel ( $obj )
$obj PHPExcel the PHPExcel object instance

setPHPExcelSheet() public method

Sets the PHP Excel sheet object
public setPHPExcelSheet ( $obj )
$obj PHPExcel_Worksheet the PHPExcel_Worksheet object instance

setPHPExcelWriter() public method

Sets the PHP Excel writer object
public setPHPExcelWriter ( $obj )
$obj PHPExcel_Writer_Abstract the PHPExcel_Writer_Abstract object instance

setVisibleColumns() protected method

Sets visible columns for export
protected setVisibleColumns ( ) : void
return void

slash() public static method

Appends slash to path if it does not exist
public static slash ( string $path, string $s = DIRECTORY_SEPARATOR ) : string
$path string
$s string the path separator
return string

Property Details

$_beginRow protected_oe property

the table beginning row
protected $_beginRow

$_columnSelectorEnabled protected_oe property

whether the column selector is enabled
protected $_columnSelectorEnabled

$_defaultExportConfig protected_oe property

the default export configuration
protected $_defaultExportConfig

$_defaultStyleOptions protected_oe property

the default style configuration
protected $_defaultStyleOptions

$_doNotStream protected_oe property

flag to identify if no streaming of file is desired
protected $_doNotStream

$_endCol protected_oe property

the current table end column
protected $_endCol

$_endRow protected_oe property

the current table end row
protected $_endRow

$_exportType protected_oe property

the data output format type. Defaults to ExportMenu::FORMAT_EXCEL_X.
protected $_exportType

$_groupedColumn protected_oe property

columns to be grouped
protected $_groupedColumn

$_groupedRow protected_oe property

grouped row values
protected $_groupedRow

$_headerBeginRow protected_oe property

the header beginning row
protected $_headerBeginRow

$_msgCat protected_oe property

translation message file category name for i18n
protected $_msgCat

$_objPHPExcel protected_oe property

object instance
protected $_objPHPExcel

$_objPHPExcelSheet protected_oe property

object instance
protected $_objPHPExcelSheet

$_objPHPExcelWriter protected_oe property

object instance
protected $_objPHPExcelWriter

$_provider protected_oe property

the modified data provider for usage with export.
protected $_provider

$_triggerDownload protected_oe property

flag to identify if download is triggered
protected $_triggerDownload

$_visibleColumns protected_oe property

the visble columns for export
protected $_visibleColumns

$afterSaveView public_oe property

the view file to show details of exported file link. This property will be validated only when $stream is false and streamAfterSave is false. You can set this to false to not display any file link details for view. This defaults to the _view PHP file in the views folder of the extension.
public $afterSaveView

$asDropdown public_oe property

whether to render the export menu as bootstrap button dropdown widget. Defaults to true. If set to false, this will generate a simple HTML list of links.
public $asDropdown

$autoWidth public_oe property

whether to auto-size the excel output column widths. Defaults to true.
public $autoWidth

$batchSize public_oe property

fetch models from the dataprovider using batches of this size. Set this to 0 (the default) to disable. If $dataProvider does not have a pagination object, this parameter is ignored. Setting this property helps reduce memory overflow issues by allowing parsing of models in batches, rather than fetching all models in one go.
public $batchSize

$clearBuffers public_oe property

whether to clear all previous / parent buffers. Defaults to false.
public $clearBuffers

$columnBatchToggleSettings public_oe property

the settings for the toggle all checkbox to check / uncheck the columns as a batch. Should be setup as an associative array which can have the following keys: - show: bool, whether the batch toggle checkbox is to be shown. Defaults to true. - label: string, the label to be displayed for toggle all. Defaults to Toggle All. - options: array, the HTML attributes for the toggle label text. Defaults to ['class'=>'kv-toggle-all']
public $columnBatchToggleSettings

$columnSelector public_oe property

the configuration of the column names in the column selector. Note: column names will be generated automatically by default. Any setting in this property will override the auto-generated column names. This list should be setup as $key => $value where: $key: int, is the zero based index of the column as set in $columns. $value: string, is the column name/label you wish to display in the column selector.
public $columnSelector

$columnSelectorMenuOptions public_oe property

the HTML attributes for the column selector menu list.
public $columnSelectorMenuOptions

$columnSelectorOptions public_oe property

the HTML attributes for the column selector dropdown button. The following special options are recognized: - label: string, defaults to empty string. - icon: string, defaults to - title: string, defaults to Select columns for export.
public $columnSelectorOptions

$container public_oe property

public $container

$contentAfter public_oe property

an array of rows to append after the footer row. Each array should be set with the following settings: - value: string, the value of the merged row - styleOptions: array, array of configuration options to set the style. See $styleOptions on how to configure.
public $contentAfter

$contentBefore public_oe property

an array of rows to prepend in front of the grid used to create things like a title. Each array should be set with the following settings: - value: string, the value of the merged row - styleOptions: array, array of configuration options to set the style. See $styleOptions on how to configure.
public $contentBefore

$deleteAfterSave public_oe property

whether to delete file after saving file to $folder and when $stream is false. This property will be validated only when $stream is false. This property is useful only if streamAfterSave is true.
public $deleteAfterSave

$disabledColumns public_oe property

the column indexes for export that will be disabled for selection in the column selector.
public $disabledColumns

$docProperties public_oe property

the PHPExcel document properties
public $docProperties

$dropdownOptions public_oe property

the HTML attributes for the export button menu. Applicable only if asDropdown is set to true. The following special options are available: - label: string, defaults to empty string - icon: string, defaults to - title: string, defaults to Export data in selected format. - menuOptions: array, the HTML attributes for the dropdown menu. - itemsBefore: array, any additional items that will be merged/prepended before with the export dropdown list. This should be similar to the items property as supported by \yii\bootstrap\ButtonDropdown widget. Note the page export items will be automatically generated based on settings in the exportConfig property. - itemsAfter: array, any additional items that will be merged/appended after with the export dropdown list. This should be similar to the items property as supported by \yii\bootstrap\ButtonDropdown widget. Note the page export items will be automatically generated based on settings in the exportConfig property.
public $dropdownOptions

$dynagrid public_oe property

enable dynagrid for column selection. If set to true the inbuilt export menu column selector functionality will be disabled and not rendered.
public $dynagrid

$dynagridOptions public_oe property

dynagrid widget options
public $dynagridOptions

$enableFormatter public_oe property

whether to enable the yii gridview formatter component. Defaults to true. If set to false, this will render content as raw format.
public $enableFormatter

$encoding public_oe property

encoding for the downloaded file header. Defaults to 'utf-8'.
public $encoding

$exportColumnsView public_oe property

the view file for rendering the columns selection
public $exportColumnsView

$exportConfig public_oe property

the export configuration. The array keys must be the one of the format constants (CSV, HTML, TEXT, EXCEL, PDF) and the array value is a configuration array consisting of these settings: - label: string, the label for the export format menu item displayed - icon: string, the glyphicon or font-awesome name suffix to be displayed before the export menu item label. If set to an empty string, this will not be displayed. - iconOptions: array, HTML attributes for export menu icon. - linkOptions: array, HTML attributes for each export item link. - filename: the base file name for the generated file. Defaults to 'grid-export'. This will be used to generate a default file name for downloading. - extension: the extension for the file name - alertMsg: string, the message prompt to show before saving. If this is empty or not set it will not be displayed. - mime: string, the mime type (for the file format) to be set before downloading. - writer: string, the PHP Excel writer type - options: array, HTML attributes for the export menu item.
public $exportConfig

$exportFormOptions public_oe property

the HTML attributes for the export form.
public $exportFormOptions

$exportFormView public_oe property

the view file for rendering the export form
public $exportFormView

$exportRequestParam public_oe property

the request parameter ($_GET or $_POST) that will be submitted during export. If not set this will be auto generated. This should be unique for each export menu widget (for multiple export menu widgets on same page).
public $exportRequestParam

$filename public_oe property

the exported output file name. Defaults to 'grid-export';
public $filename

$folder public_oe property

the folder to save the exported file. Defaults to '@webroot/tmp/'. This property will be parsed only if stream is false. If the specified folder does not exist, files will be saved to @webroot.
public $folder

$fontAwesome public_oe property

whether to use font awesome icons for rendering the icons as defined in exportConfig. If set to true, you must load the FontAwesome CSS separately in your application.
public $fontAwesome

$groupedRowStyle public_oe property

the default style configuration
public $groupedRowStyle

$hiddenColumns public_oe property

the column indexes for export that will be hidden for selection in the column selector, but will still be displayed in export output.
public $hiddenColumns

$i18n public_oe property

the internalization configuration for this widget
public $i18n

$initProvider public_oe property

whether to initialize data provider and clear models before rendering. Defaults to false.
public $initProvider

$krajeeDialogSettings public_oe property

configuration settings for the Krajee dialog widget that will be used to render alerts and confirmation dialog prompts
See also: http://demos.krajee.com/dialog
public $krajeeDialogSettings

$linkPath public_oe property

the web accessible path for the saved file location. This property will be parsed only if stream is false. Note the afterSaveView property that will render the displayed file link.
public $linkPath

$messages public_oe property

public $messages

$noExportColumns public_oe property

the column indexes for export that will not be exported at all nor will they be shown in the column selector
public $noExportColumns

$onInitExcel public_oe property

the callback function on initializing the PHP Excel library. The anonymous function should have the following signature: php function ($excel, $grid) where: - $excel: the PHPExcel object instance - $grid: the GridView object
public $onInitExcel

$onInitSheet public_oe property

the callback function to be executed on initializing the active sheet. The anonymous function should have the following signature: php function ($sheet, $grid) where: - $sheet: PHPExcel_Worksheet, the PHPExcel_Worksheet object instance - $grid: GridView, the current GridView object
public $onInitSheet

$onInitWriter public_oe property

the callback function on initializing the writer. The anonymous function should have the following signature: php function ($writer, $grid) where: - $writer: PHPExcel_Writer_Abstract, the PHPExcel_Writer_Abstract object instance - $grid: GridView, the current GridView object
public $onInitWriter

$onRenderDataCell public_oe property

the callback function to be executed on rendering each body data cell content. The anonymous function should have the following signature: php function ($cell, $content, $model, $key, $index, $grid) where: - $cell: PHPExcel_Cell, the current PHPExcel cell being rendered - $content: string, the data cell content being rendered - $model: Model, the data model to be rendered - $key: mixed, the key associated with the data model - $index: int, the zero-based index of the data model among the model array returned by [[dataProvider]]. - $grid: GridView, the current GridView object
public $onRenderDataCell

$onRenderFooterCell public_oe property

the callback function to be executed on rendering the footer cell output content. The anonymous function should have the following signature: php function ($cell, $content, $grid) where: - $sheet: PHPExcel_Worksheet, the PHPExcel_Worksheet object instance - $content: string, the footer cell content being rendered - $grid: GridView, the current GridView object
public $onRenderFooterCell

$onRenderHeaderCell public_oe property

the callback function to be executed on rendering the header cell output content. The anonymous function should have the following signature: php function ($cell, $content, $grid) where: - $cell: PHPExcel_Cell, is the current PHPExcel cell being rendered - $content: string, is the header cell content being rendered - $grid: GridView, the current GridView object
public $onRenderHeaderCell

$onRenderSheet public_oe property

the callback function to be executed on rendering the sheet. The anonymous function should have the following signature: php function ($sheet, $grid) where: - $sheet: PHPExcel_Worksheet, the PHPExcel_Worksheet object instance - $grid: GridView, the current GridView object
public $onRenderSheet

$pdfLibrary public_oe property

the library used to render the PDF. Defaults to 'mPDF'. Must be one of: - PHPExcel_Settings::PDF_RENDERER_TCPDF or 'tcPDF' - PHPExcel_Settings::PDF_RENDERER_DOMPDF or 'DomPDF' - PHPExcel_Settings::PDF_RENDERER_MPDF or 'mPDF'
public $pdfLibrary

$pdfLibraryPath public_oe property

the alias for the pdf library path to export to PDF
public $pdfLibraryPath

$pjaxContainerId public_oe property

the pjax container identifier inside which this menu is being rendered. If set the jQuery export menu plugin will get auto initialized on pjax request completion.
public $pjaxContainerId

$selectedColumns public_oe property

the selected column indexes for export. If not set this will default to all columns.
public $selectedColumns

$showColumnSelector public_oe property

whether to show a column selector to select columns for export. Defaults to true.
public $showColumnSelector

$showConfirmAlert public_oe property

whether to show a confirmation alert dialog before download. This confirmation dialog will notify user about the type of exported file for download and to disable popup blockers. Defaults to true.
public $showConfirmAlert

$stream public_oe property

whether to stream output to the browser.
public $stream

$streamAfterSave public_oe property

whether to stream after saving file to $folder and when $stream is false. This property will be validated only when $stream is false.
public $streamAfterSave

$styleOptions public_oe property

the output style configuration options. It must be the style configuration array as required by PHPExcel.
public $styleOptions

$target public_oe property

the target for submitting the export form, which will trigger the download of the exported file. Must be one of the TARGET_ constants. Defaults to ExportMenu::TARGET_POPUP. Note if you set stream and streamAfterSave to false, then this will be overridden to _self.
public $target

$template public_oe property

public $template

$timeout public_oe property

timeout for the export function (in seconds), if timeout is < 0, the default PHP timeout will be used.
public $timeout