本文整理汇总了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();
}