mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-11-04 06:37:55 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			585 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			585 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
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 = [])
 | 
						|
    {
 | 
						|
        $this->actionConfig = $config;
 | 
						|
    }
 | 
						|
 | 
						|
    public function actions()
 | 
						|
    {
 | 
						|
        return [
 | 
						|
            'error' => array_merge([
 | 
						|
                'class' => ErrorAction::className(),
 | 
						|
                'view' => '@yiiunit/data/views/error.php',
 | 
						|
            ], $this->actionConfig),
 | 
						|
        ];
 | 
						|
    }
 | 
						|
}
 |