Zurb::getCloseTagWrapper()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Spinzar\Menu\Presenters\Foundation;
4
5
use Spinzar\Menu\Presenters\Presenter;
6
7
class Zurb extends Presenter
8
{
9
    /**
10
     * {@inheritdoc }
11
     */
12
    public function getOpenTagWrapper()
13
    {
14
        return  PHP_EOL . '<nav class="custom-main">
15
        <ul class="dropdown menu" data-dropdown-menu>' . PHP_EOL;
16
    }
17
18
    /**
19
     * {@inheritdoc }
20
     */
21
    public function getCloseTagWrapper()
22
    {
23
        return  PHP_EOL . '</ul></nav>' . PHP_EOL;
24
    }
25
26
    /**
27
     * {@inheritdoc }
28
     */
29
    public function getMenuWithoutDropdownWrapper($item)
30
    {
31
        return '<li' . $this->getActiveState($item) . '><a href="' . $item->getUrl() . '">' . $item->title . '</a></li>';
32
    }
33
34
    /**
35
     * {@inheritdoc }
36
     */
37
    public function getActiveState($item)
38
    {
39
        return \Request::is($item->getRequest()) ? ' class="is-active"' : null;
40
    }
41
42
    /**
43
     * {@inheritdoc }
44
     */
45
    public function getDividerWrapper()
46
    {
47
        return '<li class="divider"></li>';
48
    }
49
50
    /**
51
     * {@inheritdoc }
52
     */
53
    public function getMenuWithDropDownWrapper($item)
54
    {
55
        return '<li class="dropdown dropdown-primary">
56
                    <a class="dropdown-toggle" href="#">' . $item->title . '</a>
57
                    <ul class="menu">
58
                      ' . $this->getChildMenuItems($item) . '
59
                    </ul>
60
                </li>' . PHP_EOL;
61
    }
62
63
64
    /**
65
     * {@inheritdoc }
66
     */
67
    public function getMultiLevelDropdownWrapper($item)
68
    {
69
        return '<li>
70
                  <a href="#">' . $item->title . '</a>
71
                  <ul class="menu">
72
                    ' . $this->getChildMenuItems($item) . '
73
                  </ul>
74
                </li>' . PHP_EOL;
75
    }
76
}
77