mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-11 19:20:01 +08:00
Allow dash char in ActionColumn’s button names.
This commit is contained in:
@@ -122,7 +122,7 @@ class ActionColumn extends Column
|
|||||||
*/
|
*/
|
||||||
protected function renderDataCellContent($model, $key, $index)
|
protected function renderDataCellContent($model, $key, $index)
|
||||||
{
|
{
|
||||||
return preg_replace_callback('/\\{(\w+)\\}/', function ($matches) use ($model, $key, $index) {
|
return preg_replace_callback('/\\{([\w\-]+)\\}/', function ($matches) use ($model, $key, $index) {
|
||||||
$name = $matches[1];
|
$name = $matches[1];
|
||||||
if (isset($this->buttons[$name])) {
|
if (isset($this->buttons[$name])) {
|
||||||
$url = $this->createUrl($name, $model, $key, $index);
|
$url = $this->createUrl($name, $model, $key, $index);
|
||||||
|
|||||||
Reference in New Issue
Block a user