1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/Ninja/Datatables/TokenDatatable.php

51 lines
936 B
PHP
Raw Normal View History

<?php
namespace App\Ninja\Datatables;
2016-05-23 18:52:20 +02:00
use URL;
/**
* Class TokenDatatable
*/
2016-05-23 18:52:20 +02:00
class TokenDatatable extends EntityDatatable
{
public $entityType = ENTITY_TOKEN;
/**
* @return array
*/
2016-05-23 18:52:20 +02:00
public function columns()
{
return [
[
'name',
function ($model) {
return link_to("tokens/{$model->public_id}/edit", $model->name)->toHtml();
}
],
[
'token',
function ($model) {
return $model->token;
}
]
];
}
/**
* @return array
*/
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");
}
]
];
}
}