mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 15:13:29 +01:00
0fbda85a59
- Removed unused uses - Type hinting for method parameters - Removed commented code - Introduced comments for classes and methods - Short array syntax
40 lines
829 B
PHP
40 lines
829 B
PHP
<?php namespace App\Ninja\Datatables;
|
|
|
|
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();
|
|
}
|
|
],
|
|
[
|
|
'token',
|
|
function ($model) {
|
|
return $model->token;
|
|
}
|
|
]
|
|
];
|
|
}
|
|
|
|
public function actions()
|
|
{
|
|
return [
|
|
[
|
|
uctrans('texts.edit_token'),
|
|
function ($model) {
|
|
return URL::to("tokens/{$model->public_id}/edit");
|
|
}
|
|
]
|
|
];
|
|
}
|
|
|
|
}
|