Completed
Push — master ( d7cd82...c94b19 )
by Mikołaj
04:50
created

MenuItem   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 36
rs 10
c 0
b 0
f 0
wmc 7
lcom 1
cbo 2

7 Methods

Rating   Name   Duplication   Size   Complexity  
A delUrl() 0 4 1
A title() 0 4 1
A isPublished() 0 4 1
A date() 0 4 1
A url() 0 4 1
A getItemType() 0 4 1
A getRealSlug() 0 4 1
1
<?php
2
3
namespace Rudolf\Modules\Appearance\Menu\Item;
4
5
use Rudolf\Component\Helpers\Navigation\MenuItem as Item;
6
use Rudolf\Component\Html\Text;
7
8
class MenuItem extends Item
9
{
10
    public function delUrl()
11
    {
12
        return DIR.'/admin/appearance/menu/del-item/'.$this->getId();
13
    }
14
15
    public function title()
16
    {
17
        return $this->getTitle();
18
    }
19
    public function isPublished()
20
    {
21
        return true;
22
    }
23
24
    public function date()
25
    {
26
        return 'xxxx-xx-xx';
27
    }
28
29
    public function url()
30
    {
31
        return Text::escape($this->getSlug());
32
    }
33
34
    public function getItemType()
35
    {
36
        return Text::escape($this->data['item_type']);
37
    }
38
39
    public function getRealSlug()
40
    {
41
        return Text::escape($this->data['slug']);
42
    }
43
}
44