Beg*_*Dev 0 php yii2 yii2-advanced-app
如何在yii2中全局更改所有模型视图的操作列标题?
[
'header' => 'Actions',
'class' => 'yii\grid\ActionColumn',
'template' => '{view} {update}'
]
Run Code Online (Sandbox Code Playgroud)
我需要更改'header' => 'Actions'所有模型的for视图.
是否可以在全局范围内更改它而不是在每个模型视图中进行更改?
你可以使用DependencyInjection:
\Yii::$container->set('yii\grid\ActionColumn', ['header' => 'Header here']);
Run Code Online (Sandbox Code Playgroud)