PHP Class DashboardNavModule, vanilla

Inheritance: extends SiteNavModule
Show file Open project: vanilla/vanilla Class Usage Examples

Public Properties

Property Type Description
$view

Protected Properties

Property Type Description
$altSectionsInfo
$dashboardNav The dashboard nav instance.
$sectionsInfo The section info for the dashboard's main nav.

Public Methods

Method Description
__construct ( $cssClass = '', $useCssPrefix = true )
getDashboardNav ( ) : DashboardNavModule
getSectionsInfo ( $alt = false ) : array Check user permissions, translate our translate-ables. Returns an array of the main sections ready to be put into a view.
getUrlForSection ( $sectionKey ) : string Retrieves or resolves the default url for a section link depending on the sessioned user's permissions.
handleEmpty ( )
prepare ( )
registerSection ( $section ) Adds a section to the sections info array to output in the dashboard.
toString ( )

Private Methods

Method Description
getActiveSection ( )
handleUserPreferencesNav ( )
handleUserPreferencesSectionLandingPage ( )
isActiveSection ( $section )

Method Details

__construct() public method

public __construct ( $cssClass = '', $useCssPrefix = true )

getDashboardNav() public static method

public static getDashboardNav ( ) : DashboardNavModule
return DashboardNavModule

getSectionsInfo() public method

Check user permissions, translate our translate-ables. Returns an array of the main sections ready to be put into a view.
public getSectionsInfo ( $alt = false ) : array
return array The sections to display in the main dashboard nav.

getUrlForSection() public method

Retrieves or resolves the default url for a section link depending on the sessioned user's permissions.
public getUrlForSection ( $sectionKey ) : string
$sectionKey The section to get the url for
return string The url associated with the passed section key

handleEmpty() public method

public handleEmpty ( )

prepare() public method

public prepare ( )

registerSection() public method

Adds a section to the sections info array to output in the dashboard.
public registerSection ( $section )
$section

toString() public method

public toString ( )

Property Details

$altSectionsInfo protected static property

protected static $altSectionsInfo

$dashboardNav protected static property

The dashboard nav instance.
protected static $dashboardNav

$sectionsInfo protected static property

The section info for the dashboard's main nav.
protected static $sectionsInfo

$view public property

public $view