File tree 1 file changed +20
-1
lines changed 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ class DocsViewer
9
9
const ERROR_NO_DOCUMENTS_AVAILABLE = 82001 ;
10
10
11
11
private string $ title = 'Documentation ' ;
12
+ private string $ menuLabel = 'Available documents ' ;
12
13
13
14
private DocsManager $ docs ;
14
15
@@ -35,12 +36,30 @@ public function __construct(DocsManager $manager, string $vendorURL)
35
36
}
36
37
}
37
38
39
+ /**
40
+ * Sets the title of the document and the navigation label.
41
+ *
42
+ * @param string $title
43
+ * @return $this
44
+ */
38
45
public function setTitle (string $ title ) : DocsViewer
39
46
{
40
47
$ this ->title = $ title ;
41
48
return $ this ;
42
49
}
43
50
51
+ /**
52
+ * Sets the label of the menu item listing all the available documents.
53
+ *
54
+ * @param string $label
55
+ * @return $this
56
+ */
57
+ public function setMenuLabel (string $ label ) : DocsViewer
58
+ {
59
+ $ this ->menuLabel = $ label ;
60
+ return $ this ;
61
+ }
62
+
44
63
public function getActiveFileID () : string
45
64
{
46
65
if (isset ($ _REQUEST ['doc ' ]) && $ this ->docs ->idExists ($ _REQUEST ['doc ' ])) {
@@ -73,7 +92,7 @@ public function display() : void
73
92
<ul class="navbar-nav mr-auto">
74
93
<li class="nav-item dropdown">
75
94
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
76
- Documentation files
95
+ <?php echo $ this -> menuLabel ?>
77
96
</a>
78
97
<div class="dropdown-menu" aria-labelledby="navbarDropdown" style="position: absolute">
79
98
<?php
You can’t perform that action at this time.
0 commit comments