Browse Source

Allow dash char in ActionColumn’s button names.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
b10c8240b3
  1. 2
      framework/yii/grid/ActionColumn.php

2
framework/yii/grid/ActionColumn.php

@ -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);

Loading…
Cancel
Save