Completed
Push — master ( 814073...4a1646 )
by Yaro
10:23 queued 02:16
created

Markdown::value()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Yaro\Jarboe\Table\Fields;
4
5
use Illuminate\Http\Request;
6
use Yaro\Jarboe\Table\Fields\Traits\Orderable;
7
8
class Markdown extends AbstractField
9
{
10
    use Orderable;
11
12 1
    public function value(Request $request)
13
    {
14 1
        return (string) parent::value($request);
15
    }
16
17 1
    public function getListValue($model)
18
    {
19 1
        return view('jarboe::crud.fields.markdown.list', [
20 1
            'model' => $model,
21 1
            'field' => $this,
22
        ]);
23
    }
24
25 1 View Code Duplication
    public function getEditFormValue($model)
26
    {
27 1
        $template = $this->isReadonly() ? 'readonly' : 'edit';
28
29 1
        return view('jarboe::crud.fields.markdown.'. $template, [
30 1
            'model' => $model,
31 1
            'field' => $this,
32
        ]);
33
    }
34
35 1
    public function getCreateFormValue()
36
    {
37 1
        return view('jarboe::crud.fields.markdown.create', [
38 1
            'field' => $this,
39
        ]);
40
    }
41
}
42