2017-01-30 20:40:43 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Ninja\Datatables;
|
2016-05-23 18:52:20 +02:00
|
|
|
|
|
|
|
use URL;
|
|
|
|
|
|
|
|
class TokenDatatable extends EntityDatatable
|
|
|
|
{
|
|
|
|
public $entityType = ENTITY_TOKEN;
|
|
|
|
|
|
|
|
public function columns()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
[
|
|
|
|
'name',
|
|
|
|
function ($model) {
|
|
|
|
return link_to("tokens/{$model->public_id}/edit", $model->name)->toHtml();
|
2017-01-30 20:40:43 +01:00
|
|
|
},
|
2016-05-23 18:52:20 +02:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'token',
|
|
|
|
function ($model) {
|
|
|
|
return $model->token;
|
2017-01-30 20:40:43 +01:00
|
|
|
},
|
|
|
|
],
|
2016-05-23 18:52:20 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function actions()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
[
|
|
|
|
uctrans('texts.edit_token'),
|
|
|
|
function ($model) {
|
|
|
|
return URL::to("tokens/{$model->public_id}/edit");
|
2017-01-30 20:40:43 +01:00
|
|
|
},
|
|
|
|
],
|
2016-05-23 18:52:20 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|