本文整理匯總了PHP中kartik\grid\GridView::run方法的典型用法代碼示例。如果您正苦於以下問題:PHP GridView::run方法的具體用法?PHP GridView::run怎麽用?PHP GridView::run使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類kartik\grid\GridView
的用法示例。
在下文中一共展示了GridView::run方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例2: run
/**
* (non-PHPdoc)
* @see \kartik\grid\GridView::run()
*/
public function run()
{
parent::run();
$view = $this->view;
FlexibleGridAsset::register($view);
}
示例3: run
public function run()
{
if ($this->grid_mode == 'export') {
$this->dataProvider->pagination = FALSE;
$this->renderHeader();
$row = $this->renderBody();
$this->renderFooter($row);
//set auto width
if ($this->autoWidth) {
foreach ($this->columns as $n => $column) {
$this->objPHPExcel->getActiveSheet()->getColumnDimension($this->columnName($n + 1))->setAutoSize(true);
}
}
// Set the pdf renderer
$rendererName = \PHPExcel_Settings::PDF_RENDERER_DOMPDF;
//create writer for saving
$objWriter = \PHPExcel_IOFactory::createWriter($this->objPHPExcel, $this->fullExportConfig[$this->fullExportType]['PHPExcel_Writer']);
if (!$this->stream) {
$objWriter->save($this->filename);
} else {
//output to browser
if (!$this->filename) {
$this->filename = $this->title;
}
ob_end_clean();
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-type: ' . $this->fullExportConfig[$this->fullExportType]['Content-type']);
header('Content-Disposition: attachment; filename="' . $this->fullExportConfig[$this->fullExportType]['filename'] . '.' . $this->fullExportConfig[$this->fullExportType]['extension'] . '"');
header('Cache-Control: max-age=0');
$objWriter->save('php://output');
Yii::$app->end();
}
} else {
if (strpos($this->layout, '{fullexport}') > 0) {
$this->layout = strtr($this->layout, ['{fullexport}' => $this->renderFullExport(), '{toolbar}' => $this->toolbar]);
} else {
$this->layout = strtr($this->layout, ['{toolbar}' => $this->toolbar]);
}
parent::run();
}
}
示例4: run
public function run()
{
BfootableAsset::register($this->getView());
$this->registerScript();
parent::run();
}
示例5: run
public function run()
{
if ($this->bootstrap && !empty($this->panel)) {
$this->renderPanel();
}
if (strpos($this->layout, '{export}') > 0) {
$this->layout = strtr($this->layout, ['{export}' => $this->renderExport(), '{toolbar}' => $this->toolbar]);
} else {
$this->layout = strtr($this->layout, ['{toolbar}' => $this->toolbar]);
}
if ($this->bootstrap && $this->responsive) {
$this->layout = str_replace('{items}', '<div class="table-responsive">{items}</div>', $this->layout);
}
parent::run();
}
示例6: run
public function run()
{
$this->registerWidget();
parent::run();
}