Php 如何在YiBooster TBGridview中创建新按钮

Php 如何在YiBooster TBGridview中创建新按钮,php,yii,yii-extensions,Php,Yii,Yii Extensions,我使用Yiibooster和TbGridView来显示一些结果。我还使用下面的代码为查看、更新和删除链接提供外观智能的图标 array( 'htmlOptions' => array('nowrap'=>'nowrap'), 'class'=>'bootstrap.widgets.TbButtonColumn', 'viewButtonUrl'=>'Yii::app()->createUrl("/item/view", array("id"=

我使用Yiibooster和TbGridView来显示一些结果。我还使用下面的代码为查看、更新和删除链接提供外观智能的图标

array(
    'htmlOptions' => array('nowrap'=>'nowrap'),
    'class'=>'bootstrap.widgets.TbButtonColumn',
    'viewButtonUrl'=>'Yii::app()->createUrl("/item/view", array("id"=>$data["id"], "sector" => $data["sector"]["slug"],"title" => $data["slug"]))',
    'updateButtonUrl'=>'Yii::app()->createUrl("/item/update", array("id"=>$data["id"]))',
    'deleteButtonUrl'=>null,
)
我想做的基本上是能够显示另一个按钮在那里或在删除按钮的替代。我只是不确定我需要如何(或者具体在哪里)为这个按钮编码值

我目前正在查看TbButtonColumn.php文件,并尝试添加一个按钮,看看它是否可以工作,但没有

这样做的正确过程是什么

提前谢谢


Jonny

对于其他按钮,有一个
按钮
参数,它是,下面是链接中的示例:

array(
    'class'=>'CButtonColumn',
    // Template to set order of buttons
    'template' => '{postview} {preview}',
    // Buttons config
    'buttons' => array(
        'postview' => array(
            'label' => '...',     // text label of the button
            'url' => '...',       // the PHP expression for generating the URL of the button
            'imageUrl' => '...',  // image URL of the button. If not set or false, a text link is used
            'options' => array(...), // HTML options for the button tag
            'click' => '...',     // a JS function to be invoked when the button is clicked
        ),
        'preview' => array(
            // Another button config
        ),
    ),
),
注意:这是
CButtonColumn
的示例,但是
TbButtonColumn
CButtonColumn
的子类,因此所有内容都适用于这两个类