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

EmailDatatable::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 17
rs 9.4285
cc 1
eloc 12
nc 1
nop 0
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
}