mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 11:39:41 +08:00
31 lines
618 B
PHP
31 lines
618 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace yiiunit\data\controllers;
|
|
|
|
use yii\web\Controller;
|
|
use yii\web\ErrorAction;
|
|
|
|
class TestController extends Controller
|
|
{
|
|
public $layout = '@yiiunit/data/views/layout.php';
|
|
|
|
private $actionConfig = [];
|
|
|
|
public function setActionConfig($config = []): void
|
|
{
|
|
$this->actionConfig = $config;
|
|
}
|
|
|
|
public function actions(): array
|
|
{
|
|
return [
|
|
'error' => array_merge([
|
|
'class' => ErrorAction::class,
|
|
'view' => '@yiiunit/data/views/error.php',
|
|
], $this->actionConfig),
|
|
];
|
|
}
|
|
}
|