Reference Source
public class | source

DrawerHelper

You can directly use an instance of this class. DrawerHelp

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
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 constructor() source

Creates an instance of the DrawerHelper.

Public Members

public defaultProfilePicture: * source

public drawer: * source

Public Methods

public closeDrawer() source

Closes the drawer if it exists.

public drawerExists(): Boolean source

Checks if the drawer view exists.

Return:

Boolean

true: if the drawer exists; false: otherwise

public fetchProfileImageFromStorage() source

Gets the profile image from the ProfileModel

public getDefaultProfile(): * source

Return:

*

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:

NameTypeAttributeDescription
numNotifications Number

The number of notifications

public setDrawer(drawer: Class) source

Sets the attribute drawer to the passed in drawer.

Params:

NameTypeAttributeDescription
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.