Passed
Pull Request — 2.x (#1360)
by Harings
09:42
created

Repeater::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace A17\Twill\View\Components;
4
5
class Repeater extends TwillFormComponent
6
{
7
    public $buttonAsLink;
8
    public $type;
9
10
    public function __construct(
11
        $type,
12
        $name = null,
13
        $buttonAsLink = false,
14
        $renderForBlocks = false,
15
        $renderForModal = false
16
    )
17
    {
18
        parent::__construct($name ?? $type, $name, $renderForBlocks, $renderForModal);
19
20
        $this->buttonAsLink = $buttonAsLink;
21
        $this->type = $type;
22
    }
23
24
    public function render()
25
    {
26
        return view('twill::partials.form._repeater');
27
    }
28
}
29