而actions用於添加額外的action函數,若是有須要,派生類能夠重載它:web
public function actions() { return [ 'error' => [ 'class' => 'yii\web\ErrorAction', ], ]; }