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

MenuType   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

7 Methods

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