CSWidgetNavigationMap
in package
This class describes the CSWidgets navigation map
Tags
Table of Contents
- __construct() : CSWidgetNavigationMap
- Create Widget Navigation map
- addContentNode() : CSPortalGuiNavigationNode
- Create a node that is based on the supplied HTML content
- addFunctionNode() : CSPortalGuiNavigationNode
- Create a node that is based on a script file which generates the nodes content
- addGlobalSearchNode() : CSPortalGuiNavigationNode
- Add a search node appearing on all Widget contents
- addIncludeNode() : CSPortalGuiNavigationNode
- Create a node that is based on a script file which generates the nodes content
- addListNode() : CSPortalGuiNavigationNode
- Create a list node that shows its children for a given number of levels
- addNode() : CSWidgetNavigationNode
- Create a node that is based on a script file which generates the nodes content
- addSearchNode() : CSPortalGuiNavigationNode
- Add a search node
- getBookmarkNode() : CSPortalGuiNavigationNode
- Retrieve the node which collects all bookmarks in the current Widget
- getGlobalSearchNode() : CSPortalGuiNavigationNode
- Retrieve a global search node of Widget
- getHomeNavigationNode() : CSWidgetNavigationNode
- Retrieve home node API object
- getHomeParams() : array<string|int, mixed>
- Enter description here .
- getNavigationID() : string
- Returns the navigation request ID of the widget.
- getNode() : CSWidgetNavigationNode
- Retrieve a node from the navigation map
- getPreferenceIDs() : array<string|int, mixed>
- Retrieve list of navigation map start nodes
- linkNode() : CSPortalGuiNavigationNode
- Add reference to existing node as new node
- setCacheOptions() : void
- Add cache to navigation map
- setHomeParams() : void
- Enter description here .
- setNavigationID() : void
- Set the current navigation identifier
- setPreferenceIDs() : void
- Set the root nodes of the navigation map
Methods
__construct()
Create Widget Navigation map
public
__construct([string $homeID = 'Home' ][, string $path = '' ][, string $label = 'Home' ][, string $alternativeContent = '' ]) : CSWidgetNavigationMap
Parameters
- $homeID : string = 'Home'
-
identifier for "home" node (optional)
- $path : string = ''
-
path to file behind home node (optional)
- $label : string = 'Home'
-
title of home node (optional)
- $alternativeContent : string = ''
-
HTML content of home node (optional)
Tags
Return values
CSWidgetNavigationMap —addContentNode()
Create a node that is based on the supplied HTML content
public
addContentNode(string $id, string $parentID, string $content[, string $label = '' ][, string $icon = '' ]) : CSPortalGuiNavigationNode
Parameters
- $id : string
-
node identifier in navigation map
- $parentID : string
-
parent navigation node
- $content : string
-
HTML content of node
- $label : string = ''
-
title of node
- $icon : string = ''
-
relative path to node icon (relative to portal.php)
Tags
Return values
CSPortalGuiNavigationNode —addFunctionNode()
Create a node that is based on a script file which generates the nodes content
public
addFunctionNode(string $id, string $parentID, string $path[, string $label = '' ][, string $icon = '' ]) : CSPortalGuiNavigationNode
The path to the node's implementation file is relative to the implementation of the CSWidget this navigation map refers to. E.g. if a Widget has been created in example.com/plugins/portal/widgets/FooWidget.php the path to the script file needs to be given relative to the example.com/plugins/portal/widgets/ folder.
Parameters
- $id : string
-
node identifier in navigation map
- $parentID : string
-
parent navigation node
- $path : string
-
relative path node's implementation
- $label : string = ''
-
title of node
- $icon : string = ''
-
relative path to node icon (relative to portal.php)
Tags
Return values
CSPortalGuiNavigationNode —addGlobalSearchNode()
Add a search node appearing on all Widget contents
public
addGlobalSearchNode(string $id, string $parentID, string $path[, string $label = '' ][, string $icon = '' ][, bool $displayInAllNodes = false ]) : CSPortalGuiNavigationNode
The path to the node's implementation file is relative to the implementation of the CSWidget this navigation map refers to. E.g. if a Widget has been created in example.com/plugins/portal/widgets/FooWidget.php the path to the script file needs to be given relative to the example.com/plugins/portal/widgets/ folder.
Parameters
- $id : string
-
node identifier in navigation map
- $parentID : string
-
parent navigation node
- $path : string
-
relative path node's implementation
- $label : string = ''
-
title of node
- $icon : string = ''
-
relative path to node icon (relative to portal.php)
- $displayInAllNodes : bool = false
-
do not display in all nodes (has to be implemented on a node basis)
Tags
Return values
CSPortalGuiNavigationNode —addIncludeNode()
Create a node that is based on a script file which generates the nodes content
public
addIncludeNode(string $id, string $parentID, string $path[, string $label = '' ][, string $icon = '' ]) : CSPortalGuiNavigationNode
The path to the node's implementation file is relative to the implementation of the CSWidget this navigation map refers to. E.g. if a Widget has been created in example.com/plugins/portal/widgets/FooWidget.php the path to the script file needs to be given relative to the example.com/plugins/portal/widgets/ folder.
Parameters
- $id : string
-
node identifier in navigation map
- $parentID : string
-
parent navigation node
- $path : string
-
relative path node's implementation
- $label : string = ''
-
title of node
- $icon : string = ''
-
relative path to node icon (relative to portal.php)
Tags
Return values
CSPortalGuiNavigationNode —addListNode()
Create a list node that shows its children for a given number of levels
public
addListNode(string $id[, string $parentID = '' ][, string $label = '' ][, string $icon = '' ][, int $levels = 1 ]) : CSPortalGuiNavigationNode
Parameters
- $id : string
-
node identifier in navigation map
- $parentID : string = ''
-
parent navigation node
- $label : string = ''
-
title of node
- $icon : string = ''
-
relative path to node icon (relative to portal.php)
- $levels : int = 1
-
number of levels to show
Tags
Return values
CSPortalGuiNavigationNode —addNode()
Create a node that is based on a script file which generates the nodes content
public
addNode(string $id, string $parentID, string $path[, string $label = '' ][, string $icon = '' ]) : CSWidgetNavigationNode
The path to the node's implementation file is relative to the implementation of the CSWidget this navigation map refers to. E.g. if a Widget has been created in example.com/plugins/portal/widgets/FooWidget.php the path to the script file needs to be given relative to the example.com/plugins/portal/widgets/ folder.
Parameters
- $id : string
-
node identifier in navigation map
- $parentID : string
-
parent navigation node
- $path : string
-
relative path node's implementation
- $label : string = ''
-
title of node
- $icon : string = ''
-
relative path to node icon (relative to portal.php)
Tags
Return values
CSWidgetNavigationNode —addSearchNode()
Add a search node
public
addSearchNode(string $id, string $parentID, string $path[, string $label = '' ][, string $icon = '' ]) : CSPortalGuiNavigationNode
The path to the node's implementation file is relative to the implementation of the CSWidget this navigation map refers to. E.g. if a Widget has been created in example.com/plugins/portal/widgets/FooWidget.php the path to the script file needs to be given relative to the example.com/plugins/portal/widgets/ folder.
Parameters
- $id : string
-
node identifier in navigation map
- $parentID : string
-
parent navigation node
- $path : string
-
relative path node's implementation
- $label : string = ''
-
title of node
- $icon : string = ''
-
relative path to node icon (relative to portal.php)
Tags
Return values
CSPortalGuiNavigationNode —getBookmarkNode()
Retrieve the node which collects all bookmarks in the current Widget
public
getBookmarkNode() : CSPortalGuiNavigationNode
Tags
Return values
CSPortalGuiNavigationNode —getGlobalSearchNode()
Retrieve a global search node of Widget
public
getGlobalSearchNode([string $navigationID = null ][, bool $checkVisbilityRights = false ]) : CSPortalGuiNavigationNode
Parameters
- $navigationID : string = null
-
node identifier in navigation map
- $checkVisbilityRights : bool = false
-
check access rights to this node
Tags
Return values
CSPortalGuiNavigationNode —getHomeNavigationNode()
Retrieve home node API object
public
getHomeNavigationNode() : CSWidgetNavigationNode
Tags
Return values
CSWidgetNavigationNode —getHomeParams()
Enter description here .
public
getHomeParams() : array<string|int, mixed>
..
Tags
Return values
array<string|int, mixed> —getNavigationID()
Returns the navigation request ID of the widget.
public
getNavigationID() : string
Tags
Return values
string —getNode()
Retrieve a node from the navigation map
public
getNode([string $id = null ][, bool $createIfMissing = false ][, bool $returnHomeAsAlternative = false ]) : CSWidgetNavigationNode
Parameters
- $id : string = null
-
navigation node identifier, e.g. "home"
- $createIfMissing : bool = false
-
create this node if its missing
- $returnHomeAsAlternative : bool = false
-
if true "home" node is returned as a default
Tags
Return values
CSWidgetNavigationNode —getPreferenceIDs()
Retrieve list of navigation map start nodes
public
getPreferenceIDs() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —linkNode()
Add reference to existing node as new node
public
linkNode(strnig $id[, string $parentID = '' ][, string $label = '' ][, string $icon = '' ]) : CSPortalGuiNavigationNode
Parameters
- $id : strnig
-
node identifier in navigation map of existing node
- $parentID : string = ''
-
parent navigation node
- $label : string = ''
-
title of node
- $icon : string = ''
-
relative path to node icon (relative to portal.php)
Tags
Return values
CSPortalGuiNavigationNode —setCacheOptions()
Add cache to navigation map
public
setCacheOptions(CSWidgetCacheOptions $cache[, array<string|int, mixed> $ids = array() ]) : void
Parameters
- $cache : CSWidgetCacheOptions
-
API object of Widget cache
- $ids : array<string|int, mixed> = array()
-
list of node identifiers the cache is applied to
Tags
Return values
void —setHomeParams()
Enter description here .
public
setHomeParams(array<string|int, mixed> $params) : void
..
Parameters
- $params : array<string|int, mixed>
Tags
Return values
void —setNavigationID()
Set the current navigation identifier
public
setNavigationID(string $navID) : void
Parameters
- $navID : string
Tags
Return values
void —setPreferenceIDs()
Set the root nodes of the navigation map
public
setPreferenceIDs(array<string|int, mixed> $ids) : void
Parameters
- $ids : array<string|int, mixed>
-
list of node identifiers
