Completed
Push — master ( d015d4...c50906 )
by Mikołaj
02:42
created

AddView::display()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 12
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
c 0
b 0
f 0
nc 1
nop 3
dl 12
loc 12
rs 9.4285
1
<?php
2
3
namespace Rudolf\Modules\Appearance\Menu;
4
5
use Rudolf\Component\Helpers\Navigation\MenuItemCollection;
6
use Rudolf\Framework\View\AdminView;
7
8 View Code Duplication
class AddView extends AdminView
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    /**
11
     * @var MenuItem
12
     */
13
    protected $item;
14
15
    /**
16
     * @var array
17
     */
18
    protected $types;
19
20
    /**
21
     * @var MenuItemCollection
22
     */
23
    protected $items;
24
25
    /**
26
     * @var string
27
     */
28
    protected $templateType;
29
30
    public function display($data, $types, $items)
31
    {
32
        $this->pageTitle = _('Menu editor');
33
        $this->head->setTitle($this->pageTitle);
34
        $this->item = $data;
35
        $this->types = $types;
36
        $this->items = $items;
37
38
        $this->templateType = 'add';
39
40
        $this->template = 'appearance-menu-item';
41
    }
42
}
43