DrawerHelper
Class to help with the facilitation of the side drawer. The drawer cannot be accessed across components so this class allows the drawer to register itself and be used.
Constructor Summary
Public Constructor | ||
public |
Creates an instance of the DrawerHelper. |
Member Summary
Public Members | ||
public |
|
|
public |
drawer: * |
Method Summary
Public Methods | ||
public |
Closes the drawer if it exists. |
|
public |
Checks if the drawer view exists. |
|
public |
Gets the profile image from the ProfileModel |
|
public |
getDefaultProfile(): * |
|
public |
getDrawer(): Class Returns the stored instance of the side drawer |
|
public |
openDrawer(numNotifications: Number) Opens the drawer if it exists and adds the number of notifications if it exists. |
|
public |
setDrawer(drawer: Class) Sets the attribute drawer to the passed in drawer. |
|
public |
toggle() Checks if the drawer instance exists, and if it does, toggles the side drawer. |
Public Constructors
Public Methods
public getDrawer(): Class source
Returns the stored instance of the side drawer
Return:
Class | An instance of the SideDrawer class |
public openDrawer(numNotifications: Number) source
Opens the drawer if it exists and adds the number of notifications if it exists.
Params:
Name | Type | Attribute | Description |
numNotifications | Number | The number of notifications |
public setDrawer(drawer: Class) source
Sets the attribute drawer to the passed in drawer.
Params:
Name | Type | Attribute | Description |
drawer | Class | An instance of the SideDrawer class |
public toggle() source
Checks if the drawer instance exists, and if it does, toggles the side drawer.