BreadcrumbControl   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 37
ccs 0
cts 19
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
A render() 0 11 1
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