2017-11-29 11:44:28 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Ninja\Datatables;
|
|
|
|
|
|
|
|
use URL;
|
|
|
|
|
|
|
|
class SubscriptionDatatable extends EntityDatatable
|
|
|
|
{
|
|
|
|
public $entityType = ENTITY_SUBSCRIPTION;
|
|
|
|
|
|
|
|
public function columns()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
[
|
|
|
|
'event',
|
|
|
|
function ($model) {
|
|
|
|
return trans('texts.subscription_event_' . $model->event);
|
|
|
|
},
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'target',
|
|
|
|
function ($model) {
|
2018-01-25 10:42:58 +01:00
|
|
|
return $this->showWithTooltip($model->target, 40);
|
2017-11-29 11:44:28 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function actions()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
[
|
|
|
|
uctrans('texts.edit_subscription'),
|
|
|
|
function ($model) {
|
|
|
|
return URL::to("subscriptions/{$model->public_id}/edit");
|
|
|
|
},
|
|
|
|
],
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|