BreadcrumbControl::render()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 11
ccs 0
cts 10
cp 0
rs 9.9
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace UniMan\Components\Breadcrumb;
4
5
use Nette\Application\UI\Control;
6
7
class BreadcrumbControl extends Control
8
{
9
    private $driver;
10
11
    private $database;
12
13
    private $databaseName;
14
15
    private $type;
16
17
    private $table;
18
19
    private $item;
20
21
    public function __construct($driver, $database, $databaseName, $type, $table, $item)
22
    {
23
        parent::__construct();
24
        $this->driver = $driver;
25
        $this->database = $database;
26
        $this->databaseName = $databaseName;
27
        $this->type = $type;
28
        $this->table = $table;
29
        $this->item = $item;
30
    }
31
32
    public function render()
33
    {
34
        $this->template->driver = $this->driver;
35
        $this->template->database = $this->database;
36
        $this->template->databaseName = $this->databaseName;
37
        $this->template->type = $this->type;
38
        $this->template->table = $this->table;
39
        $this->template->item = $this->item;
40
        $this->template->setFile(__DIR__ . '/default.latte');
41
        $this->template->render();
42
    }
43
}
44