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

MenuItem   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 35
rs 10
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 3 1
A getItemType() 0 4 1
A getRealSlug() 0 4 1
1
<?php
2
3
namespace Rudolf\Modules\Appearance\Menu;
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/'.$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
        return Text::escape($this->getSlug());
31
    }
32
33
    public function getItemType()
34
    {
35
        return Text::escape($this->data['item_type']);
36
    }
37
38
    public function getRealSlug()
39
    {
40
        return Text::escape($this->data['slug']);
41
    }
42
}
43