Hello guys,
is there a way to disable the "copy" button on campaign sent / paused ?
I've tried with this hook but not work
Have you some suggestion ?
thanks
is there a way to disable the "copy" button on campaign sent / paused ?
I've tried with this hook but not work
PHP:
Yii::app()->hooks->addFilter('grid_view_columns', function($columns) {
if (Yii::app()->controller->id != 'campaigns') {
return $columns;
}
foreach ($columns as $index => $column) {
if (!isset($column['class']) || $column['class'] != 'CButtonColumn') {
continue;
}
if (!isset($column['buttons']['copy'])) {
continue;
}
$columns[$index]['buttons']['copy']['visible'] = '$data->editable && !$data->isPaused';
break;
}
return $columns;
});
Have you some suggestion ?
thanks