Allow dash char in ActionColumn’s button names.

This commit is contained in:
Qiang Xue
2013-12-27 09:19:27 -05:00
parent 3b1602acc8
commit b10c8240b3

View File

@ -122,7 +122,7 @@ class ActionColumn extends Column
*/
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];
if (isset($this->buttons[$name])) {
$url = $this->createUrl($name, $model, $key, $index);