PHP Класс kartik\export\ExportMenu

С версии: 1.0
Автор: Kartik Visweswaran ([email protected])
Наследование: extends kartik\grid\GridView, use trait kartik\base\TranslationTrait
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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)

Свойство Тип Описание
$_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

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Описание методов

checkGroupedRow() защищенный Метод

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]].
Результат void

clearOutputBuffers() защищенный Метод

Clear output buffers
protected clearOutputBuffers ( ) : void
Результат void

columnName() публичный статический Метод

Returns an excel column name.
public static columnName ( integer $index ) : string
$index integer the column index number
Результат string

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

Destroys PHP Excel Object Instance
public destroyPHPExcel ( ) : void
Результат void

findGroupedColumn() защищенный Метод

Search all groupable columns
protected findGroupedColumn ( )

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

Generates the after content at the bottom of the exported sheet
public generateAfterContent ( $row ) : void
Результат void

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

Generates the before content at the top of the exported sheet
public generateBeforeContent ( ) : void
Результат void

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

Generates the output data body content.
public generateBody ( ) : integer
Результат integer the number of output rows.

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

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

generateGroupedRow() защищенный Метод

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

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

Generates the output data header content.
public generateHeader ( ) : void
Результат void

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

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]].
Результат void

getAttributeLabel() защищенный Метод

Generates the attribute label
protected getAttributeLabel ( string $attribute ) : string
$attribute string
Результат string

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

Gets the column header content
public getColumnHeader ( DataColumn $col ) : string
$col yii\grid\DataColumn
Результат string

getColumnLabel() защищенный Метод

Fetches the column label
protected getColumnLabel ( integer $key, Column $column ) : string
$key integer
$column yii\grid\Column
Результат string

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

Gets the PHP Excel object
public getPHPExcel ( ) : PHPExcel
Результат PHPExcel the current PHPExcel object instance

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

Gets the PHP Excel sheet object
public getPHPExcelSheet ( ) : PHPExcel_Worksheet
Результат PHPExcel_Worksheet the current PHPExcel_Worksheet object instance

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

Gets the PHP Excel writer object
public getPHPExcelWriter ( ) : PHPExcel_Writer_Abstrac\PHPExcel_Writer_Abstract
Результат PHPExcel_Writer_Abstrac\PHPExcel_Writer_Abstract the current PHPExcel_Writer_Abstract object instance

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

Gets the visible columns for export
public getVisibleColumns ( ) : array
Результат array the columns configuration

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

public init ( )

initColumnSelector() защищенный Метод

Initialize column selector list
protected initColumnSelector ( ) : void
Результат void

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

Initializes export settings
public initExport ( ) : void
Результат void

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

Initializes PHP Excel Object Instance
public initPHPExcel ( ) : void
Результат void

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

Initializes PHP Excel Worksheet Instance
public initPHPExcelSheet ( ) : void
Результат void

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

Initializes PHP Excel Writer Object Instance
public initPHPExcelWriter ( string $type ) : void
$type string the writer type as set in export config
Результат void

initSelectedColumns() защищенный Метод

Initialize columns selected for export
protected initSelectedColumns ( ) : void
Результат void

raiseEvent() защищенный Метод

Raises a callable event
protected raiseEvent ( string $event, array $params ) : void
$event string the event name
$params array the parameters to the callable function
Результат void

registerAssets() защищенный Метод

Registers client assets needed for Export Menu widget
protected registerAssets ( ) : void
Результат void

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

Renders the columns selector
public renderColumnSelector ( ) : string
Результат string the column selector markup

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

Renders the export menu
public renderExportMenu ( ) : string
Результат string the export menu markup

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

public run ( )

setDefaultExportConfig() защищенный Метод

Sets the default export configuration
protected setDefaultExportConfig ( ) : void
Результат void

setHttpHeaders() защищенный Метод

Set HTTP headers for download
protected setHttpHeaders ( ) : void
Результат void

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

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

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

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

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

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

setVisibleColumns() защищенный Метод

Sets visible columns for export
protected setVisibleColumns ( ) : void
Результат void

slash() публичный статический Метод

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
Результат string

Описание свойств

$_beginRow защищенное свойство

the table beginning row
protected $_beginRow

$_columnSelectorEnabled защищенное свойство

whether the column selector is enabled
protected $_columnSelectorEnabled

$_defaultExportConfig защищенное свойство

the default export configuration
protected $_defaultExportConfig

$_defaultStyleOptions защищенное свойство

the default style configuration
protected $_defaultStyleOptions

$_doNotStream защищенное свойство

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

$_endCol защищенное свойство

the current table end column
protected $_endCol

$_endRow защищенное свойство

the current table end row
protected $_endRow

$_exportType защищенное свойство

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

$_groupedColumn защищенное свойство

columns to be grouped
protected $_groupedColumn

$_groupedRow защищенное свойство

grouped row values
protected $_groupedRow

$_headerBeginRow защищенное свойство

the header beginning row
protected $_headerBeginRow

$_msgCat защищенное свойство

translation message file category name for i18n
protected $_msgCat

$_objPHPExcel защищенное свойство

object instance
protected $_objPHPExcel

$_objPHPExcelSheet защищенное свойство

object instance
protected $_objPHPExcelSheet

$_objPHPExcelWriter защищенное свойство

object instance
protected $_objPHPExcelWriter

$_provider защищенное свойство

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

$_triggerDownload защищенное свойство

flag to identify if download is triggered
protected $_triggerDownload

$_visibleColumns защищенное свойство

the visble columns for export
protected $_visibleColumns

$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.
public $afterSaveView

$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.
public $asDropdown

$autoWidth публичное свойство

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

$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.
public $batchSize

$clearBuffers публичное свойство

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

$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']
public $columnBatchToggleSettings

$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.
public $columnSelector

$columnSelectorMenuOptions публичное свойство

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

$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.
public $columnSelectorOptions

$container публичное свойство

public $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.
public $contentAfter

$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.
public $contentBefore

$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.
public $deleteAfterSave

$disabledColumns публичное свойство

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

$docProperties публичное свойство

the PHPExcel document properties
public $docProperties

$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.
public $dropdownOptions

$dynagrid публичное свойство

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 публичное свойство

dynagrid widget options
public $dynagridOptions

$enableFormatter публичное свойство

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 публичное свойство

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

$exportColumnsView публичное свойство

the view file for rendering the columns selection
public $exportColumnsView

$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.
public $exportConfig

$exportFormOptions публичное свойство

the HTML attributes for the export form.
public $exportFormOptions

$exportFormView публичное свойство

the view file for rendering the export form
public $exportFormView

$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).
public $exportRequestParam

$filename публичное свойство

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

$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.
public $folder

$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.
public $fontAwesome

$groupedRowStyle публичное свойство

the default style configuration
public $groupedRowStyle

$hiddenColumns публичное свойство

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 публичное свойство

the internalization configuration for this widget
public $i18n

$initProvider публичное свойство

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

$krajeeDialogSettings публичное свойство

configuration settings for the Krajee dialog widget that will be used to render alerts and confirmation dialog prompts
См. также: http://demos.krajee.com/dialog
public $krajeeDialogSettings

$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.
public $linkPath

$messages публичное свойство

public $messages

$noExportColumns публичное свойство

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

$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
public $onInitExcel

$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
public $onInitSheet

$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
public $onInitWriter

$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
public $onRenderDataCell

$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
public $onRenderFooterCell

$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
public $onRenderHeaderCell

$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
public $onRenderSheet

$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'
public $pdfLibrary

$pdfLibraryPath публичное свойство

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

$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.
public $pjaxContainerId

$selectedColumns публичное свойство

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

$showColumnSelector публичное свойство

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

$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.
public $showConfirmAlert

$stream публичное свойство

whether to stream output to the browser.
public $stream

$streamAfterSave публичное свойство

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 публичное свойство

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

$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.
public $target

$template публичное свойство

public $template

$timeout публичное свойство

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