NavMenuPresenter::getMenuWithDropDownWrapper()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 0
cts 13
cp 0
rs 9.8333
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Nwidart\Menus\Presenters\Bootstrap;
4
5
class NavMenuPresenter extends NavbarPresenter
6
{
7
    /**
8
     * {@inheritdoc }.
9
     */
10
    public function getOpenTagWrapper()
11
    {
12
        return PHP_EOL . '<ul class="nav navmenu-nav">' . PHP_EOL;
13
    }
14
15
    /**
16
     * {@inheritdoc }.
17
     */
18
    public function getMenuWithDropDownWrapper($item)
19
    {
20
        return '<li class="dropdown' . $this->getActiveStateOnChild($item, ' active open') . '">
21
		          <a href="#" class="dropdown-toggle" data-toggle="dropdown">
22
					' . $item->getIcon() . ' ' . $item->title . '
23
			      	<b class="caret pull-right"></b>
24
			      </a>
25
			      <ul class="dropdown-menu navmenu-nav">
26
			      	' . $this->getChildMenuItems($item) . '
27
			      </ul>
28
		      	</li>'
29
        . PHP_EOL;
30
    }
31
32
    /**
33
     * Get multilevel menu wrapper.
34
     *
35
     * @param \Nwidart\Menus\MenuItem $item
36
     *
37
     * @return string`
0 ignored issues
show
Documentation introduced by
The doc-type string` could not be parsed: Unknown type name "string`" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
38
     */
39
    public function getMultiLevelDropdownWrapper($item)
40
    {
41
        return '<li class="dropdown' . $this->getActiveStateOnChild($item, ' active open') . '">
42
		          <a href="#" class="dropdown-toggle" data-toggle="dropdown">
43
					' . $item->getIcon() . ' ' . $item->title . '
44
			      	<b class="caret pull-right caret-right"></b>
45
			      </a>
46
			      <ul class="dropdown-menu navmenu-nav">
47
			      	' . $this->getChildMenuItems($item) . '
48
			      </ul>
49
		      	</li>'
50
        . PHP_EOL;
51
    }
52
}
53