Completed
Pull Request — master (#3)
by Denis
01:50 queued 23s
created

Action::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 3
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Woo\GridView\Columns\Actions;
4
5
class Action
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $url;
11
12
    /**
13
     * @var string
14
     */
15
    protected $content;
16
17
    /**
18
     * @var string
19
     */
20
    protected $method;
21
22
    public function __construct(string $url, string $content, string $method = 'GET')
23
    {
24
        $this->url = $url;
25
26
        $this->content = $content;
27
28
        $this->method = $method;
29
    }
30
31
    public function render()
32
    {
33
        return view('woo_gridview::columns.action', [
34
            'url' => $this->url,
35
            'content' => $this->content,
36
            'method' => $this->method,
37
        ])->render();
38
    }
39
}