mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 05:07:31 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			41 lines
		
	
	
		
			912 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			912 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?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) {
 | 
						|
                    return e(substr($model->target, 0, 40) . (strlen($model->target) > 40 ? '...' : ''));
 | 
						|
                },
 | 
						|
            ],
 | 
						|
        ];
 | 
						|
    }
 | 
						|
 | 
						|
    public function actions()
 | 
						|
    {
 | 
						|
        return [
 | 
						|
            [
 | 
						|
                uctrans('texts.edit_subscription'),
 | 
						|
                function ($model) {
 | 
						|
                    return URL::to("subscriptions/{$model->public_id}/edit");
 | 
						|
                },
 | 
						|
            ],
 | 
						|
        ];
 | 
						|
    }
 | 
						|
}
 |