PHP 클래스 kartik\export\ExportMenu

부터: 1.0
저자: Kartik Visweswaran ([email protected])
상속: extends kartik\grid\GridView, use trait kartik\base\TranslationTrait
파일 보기 프로젝트 열기: kartik-v/yii2-export 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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.

보호된 프로퍼티들

프로퍼티 타입 설명
$_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