Completed
Push — master ( 188ffb...31684b )
by Maxime
02:48
created

EmailDatatable   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 20
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 17 1
1
<?php namespace Distilleries\Expendable\Http\Datatables\Email;
2
3
use Distilleries\Expendable\Http\Datatables\BaseDatatable;
4
use Distilleries\Expendable\Helpers\StaticLabel;
5
6
class EmailDatatable extends BaseDatatable {
7
8
    public function build()
9
    {
10
        $this->add('id');
11
        $this->add('libelle', null, trans('expendable::datatable.subject'));
12
        $this->add('body_type', function($model)
13
        {
14
            return StaticLabel::bodyType($model->body_type);
15
        },trans('expendable::datatable.type'));
16
        $this->add('action', function($model)
17
        {
18
            return StaticLabel::mailActions($model->action);
19
        });
20
        $this->add('cc');
21
        $this->add('bcc');
22
        $this->addTranslationAction();
23
        $this->addDefaultAction();
24
    }
25
}