@@ -63,19 +63,26 @@ export class NavigationItem {
63
63
*/
64
64
isInPath : boolean ;
65
65
66
+ /**
67
+ * The source [Reflection] this item is built from
68
+ */
69
+ reflection : Reflection ;
70
+
66
71
/**
67
72
* Create a new NavigationItem instance.
68
73
*
69
74
* @param title The visible title of the navigation node.
70
75
* @param url The url this navigation node points to.
71
76
* @param parent The parent navigation node.
72
77
* @param cssClasses A string containing the css classes of this node.
78
+ * @param reflection The source [Reflection] for this [NavigationItem]
73
79
*/
74
- constructor ( title ?: string , url ?: string , parent ?: NavigationItem , cssClasses ?: string ) {
80
+ constructor ( title ?: string , url ?: string , parent ?: NavigationItem , cssClasses ?: string , reflection ?: Reflection ) {
75
81
this . title = title || '' ;
76
82
this . url = url || '' ;
77
83
this . parent = parent || null ;
78
84
this . cssClasses = cssClasses || '' ;
85
+ this . reflection = reflection ;
79
86
80
87
if ( ! url ) {
81
88
this . isLabel = true ;
@@ -109,6 +116,6 @@ export class NavigationItem {
109
116
name = `<em>${ reflection . kindString } </em>` ;
110
117
}
111
118
112
- return new NavigationItem ( name , reflection . url , parent , reflection . cssClasses ) ;
119
+ return new NavigationItem ( name , reflection . url , parent , reflection . cssClasses , reflection ) ;
113
120
}
114
121
}
0 commit comments