Completed
Pull Request — master (#14)
by
unknown
15:13 queued 07:44
created

DummyField::getCreateFormView()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
ccs 3
cts 3
cp 1
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Yaro\Jarboe\Table\Fields\Markup;
4
5
use Illuminate\Http\Request;
6
use Yaro\Jarboe\Table\Fields\AbstractField;
7
8
class DummyField extends AbstractField
9
{
10
    protected $hidden = [
11
        'list'   => true,
12
        'edit'   => false,
13
        'create' => false,
14
    ];
15
16 1
    public function shouldSkip(Request $request)
17
    {
18 1
        return true;
19
    }
20
21 1
    public function getListView($model)
22
    {
23 1
        return view('jarboe::crud.fields.markup.dummy.list', [
24 1
            'model' => $model,
25 1
            'field' => $this,
26
        ]);
27
    }
28
29 1
    public function getEditFormView($model)
30
    {
31 1
        $template = $this->isReadonly() ? 'readonly' : 'edit';
32
33 1
        return view('jarboe::crud.fields.markup.dummy.'. $template, [
34 1
            'model' => $model,
35 1
            'field' => $this,
36
        ]);
37
    }
38
39 1
    public function getCreateFormView()
40
    {
41 1
        return view('jarboe::crud.fields.markup.dummy.create', [
42 1
            'field' => $this,
43
        ]);
44
    }
45
}
46