Project

General

Profile

1
export class MenuItem {
2
    id:string = ""; // for root menu in order to close the dropdown when clicked
3
    title: string = "";
4
    url:string = ""; // external url
5
    route:string = ""; // internal  url - using angular routing and components
6
    needsAuthorization:boolean = false; // needs admin rights - mainly for user menu at this point
7
    entitiesRequired:string[] = []; // openaire entities used in page "publication, dataset, organization, software, project, datasource"
8
    routeRequired:string[] = []; // the routes that if aren't enable the menu item doesn't make sense
9
    params:any = {};
10
    constructor(id:string, title:string, url:string, route:string, needsAuthorization:boolean, entitiesRequired:string[],routeRequired:string[], params){
11
      this.id = id;
12
      this.title = title;
13
      this.url = url;
14
      this.route = route;
15
      this.needsAuthorization = needsAuthorization;
16
      this.entitiesRequired = entitiesRequired;
17
      this.routeRequired =  routeRequired;
18
      this.params = params;
19
    }
20

    
21
  }
22
  export class RootMenuItem {
23
       rootItem:MenuItem;
24
       items:MenuItem[]=[];
25
  }
(4-4/9)