kentuck1213
@kentuck1213

Как правильно задать url button в виджете?

<?php $this->widget('bootstrap.widgets.TbGridView', array(
    'type'=>'striped bordered condensed',
    'dataProvider'=>$model->searchEmployees(),
    'columns'=>array(
        'id',
        'full_name_ru',
        array('name' => 'position_type','value'=> '$data->getPositionType()[$data->position_type]'),
        'work_phone',
        'home_phone',
        array(
            'class'=>'bootstrap.widgets.TbButtonColumn',
            'htmlOptions'=>array('style'=>'width: 50px'),
          'updateButtonUrl' => array('href' => '/RefEmployeesMahala/update/1'),
        ),
    )
)); ?>

Всем привет не получается дать url кнопки update в админке, здесь задаю 'updateButtonUrl' => array('href' => '/RefEmployeesMahala/update/1'),
Ошибка в браузере
call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members
Yii1
  • Вопрос задан
  • 161 просмотр
Решения вопроса 1
gogametreveli
@gogametreveli
'updateButtonUrl'=>'Yii::app()->createUrl("/RefEmployeesMahala/update", array("id"=>$data["id"]))',
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы