summaryrefslogtreecommitdiffstats
path: root/library/Icinga/Web/Navigation/Renderer/NavigationRendererInterface.php
blob: 4495b737953eec81ec838e867968095e92552ee8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?php
/* Icinga Web 2 | (c) 2015 Icinga Development Team | GPLv2+ */

namespace Icinga\Web\Navigation\Renderer;

/**
 * Interface for navigation renderers
 */
interface NavigationRendererInterface
{
    /**
     * CSS class for items
     *
     * @var string
     */
    const CSS_CLASS_ITEM = 'nav-item';

    /**
     * CSS class for active items
     *
     * @var string
     */
    const CSS_CLASS_ACTIVE = 'active';

    /**
     * CSS class for selected items
     *
     * @var string
     */
    const CSS_CLASS_SELECTED = 'selected';

    /**
     * CSS class for dropdown items
     *
     * @var string
     */
    const CSS_CLASS_DROPDOWN = 'dropdown-nav-item';

    /**
     * CSS class for a dropdown item's trigger
     *
     * @var string
     */
    const CSS_CLASS_DROPDOWN_TOGGLE = 'dropdown-toggle';

    /**
     * CSS class for the ul element
     *
     * @var string
     */
    const CSS_CLASS_NAV = 'nav';

    /**
     * CSS class for the ul element with dropdown layout
     *
     * @var string
     */
    const CSS_CLASS_NAV_DROPDOWN = 'dropdown-nav';

    /**
     * CSS class for the ul element with tabs layout
     *
     * @var string
     */
    const CSS_CLASS_NAV_TABS = 'tab-nav';

    /**
     * Icon for a dropdown item's trigger
     *
     * @var string
     */
    const DROPDOWN_TOGGLE_ICON = 'menu';

    /**
     * Default tag for the outer element the navigation will be wrapped with
     *
     * @var string
     */
    const OUTER_ELEMENT_TAG = 'div';

    /**
     * The heading's rank
     *
     * @var int
     */
    const HEADING_RANK = 1;

    /**
     * Set the tag for the outer element the navigation is wrapped with
     *
     * @param   string  $tag
     *
     * @return  $this
     */
    public function setElementTag($tag);

    /**
     * Return the tag for the outer element the navigation is wrapped with
     *
     * @return  string
     */
    public function getElementTag();

    /**
     * Set the CSS class to use for the outer element
     *
     * @param   string  $class
     *
     * @return  $this
     */
    public function setCssClass($class);

    /**
     * Get the CSS class used for the outer element
     *
     * @return  string
     */
    public function getCssClass();

    /**
     * Set the navigation's heading text
     *
     * @param   string  $heading
     *
     * @return  $this
     */
    public function setHeading($heading);

    /**
     * Return the navigation's heading text
     *
     * @return  string
     */
    public function getHeading();

    /**
     * Return the navigation rendered to HTML
     *
     * @return  string
     */
    public function render();
}