@@ -63,19 +63,26 @@ export class NavigationItem {
6363 */
6464 isInPath : boolean ;
6565
66+ /**
67+ * The source [Reflection] this item is built from
68+ */
69+ reflection : Reflection ;
70+
6671 /**
6772 * Create a new NavigationItem instance.
6873 *
6974 * @param title The visible title of the navigation node.
7075 * @param url The url this navigation node points to.
7176 * @param parent The parent navigation node.
7277 * @param cssClasses A string containing the css classes of this node.
78+ * @param reflection The source [Reflection] for this [NavigationItem]
7379 */
74- constructor ( title ?: string , url ?: string , parent ?: NavigationItem , cssClasses ?: string ) {
80+ constructor ( title ?: string , url ?: string , parent ?: NavigationItem , cssClasses ?: string , reflection ?: Reflection ) {
7581 this . title = title || '' ;
7682 this . url = url || '' ;
7783 this . parent = parent || null ;
7884 this . cssClasses = cssClasses || '' ;
85+ this . reflection = reflection ;
7986
8087 if ( ! url ) {
8188 this . isLabel = true ;
@@ -109,6 +116,6 @@ export class NavigationItem {
109116 name = `<em>${ reflection . kindString } </em>` ;
110117 }
111118
112- return new NavigationItem ( name , reflection . url , parent , reflection . cssClasses ) ;
119+ return new NavigationItem ( name , reflection . url , parent , reflection . cssClasses , reflection ) ;
113120 }
114121}
0 commit comments