CSWidgetNavigationNode
in package
This class describes the CSWidgets navigationmap nodes
Tags
Table of Contents
- __construct() : CSWidgetNavigationNode
- Construct node in navigation map
- 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
- addToList() : CSPortalGuiListItem
- Add node to list of CSPortalGuiList object
- createBookmarkList() : CSPortalGuiList
- Create bookmark list from CSPortalGuiList object
- createNavigationList() : CSPortalGuiList
- Create navigation list from CSPortalGuiList object
- createNavigator() : CSPortalGuiNavigator
- Create Navigator from CSPortalGuiNavigator object
- getCacheOptions() : CSWidgetCacheOptions
- Get node's caching options
- getChildren() : array<string|int, mixed>
- Retrieve all children of this node
- getIcon() : string
- Retrieve path to icon of this node
- getID() : string
- Retrieve node identifier
- getLabel() : string
- Get node label
- getLevel() : int
- Get current node's level in the navigation map
- getParent() : CSWidgetNavigationNode
- Retrieve parent node
- getPath() : string
- Enter description here .
- getSearchNode() : CSWidgetNavigationNode
- Retrieve search node from children of node, if node is search node itself or the global search node.
- getShowInList() : bool
- Check if node is shown in list
- isBookmarkable() : bool
- Check if node can be bookmarked
- isHiddenAsStartupNode() : bool
- Check if node is hidden from startup nodes
- isSearchNode() : bool
- Check if node is a search node
- linkNode() : CSPortalGuiNavigationNode
- Add reference to existing node as new node
- load() : string
- Load node content
- navigateTo() : string
- Navigate Widget to this note
- setBookmarkable() : void
- Define if node can be bookmarked or not
- setBookmarkMode() : void
- Switch to bookmark mode. This node does not have own content but will list bookmarks for a given number of levels
- setCacheOptions() : void
- Enhance cache options of node
- setContent() : void
- Set HTML content of node
- setExtendedSearch() : void
- Set an extended search content
- setHideAsStartupNode() : void
- Sets whether the node should be hidden from startup nodes
- setIcon() : void
- Set the path to the icon of this node
- setLabel() : void
- Set node label
- setListMode() : void
- Switch to list mode. This node does not have own content but will list its child nodes for a given number of levels
- setPath() : mixed
- Enter description here .
- setSearchbarVisible() : void
- Set searchbar visible
- setShowInList() : void
- set if node is displayed in lost or not
Methods
__construct()
Construct node in navigation map
public
__construct(CSWidgetNavigationMap $navigationMap, string $ID[, 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
- $navigationMap : CSWidgetNavigationMap
-
reference to navigation map
- $ID : string
-
new node identifier
- $path : string = ''
-
relative path to node's implementation
- $label : string = ''
-
title of node
- $icon : string = ''
-
relative path to node icon (relative to portal.php)
Tags
Return values
CSWidgetNavigationNode —addListNode()
Create a list node that shows its children for a given number of levels
public
addListNode(mixed $ID[, string $label = '' ][, string $icon = '' ][, int $levels = 1 ]) : CSPortalGuiNavigationNode
Parameters
- $ID : mixed
- $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(mixed $mId, 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
- $mId : mixed
-
node identifier in navigation map
- $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(mixed $ID, 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 : mixed
- $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 —addToList()
Add node to list of CSPortalGuiList object
public
addToList(CSPortalGuiList $list[, string $title = '' ][, string $icon = null ]) : CSPortalGuiListItem
Parameters
- $list : CSPortalGuiList
-
API object for portal GUI lists
- $title : string = ''
-
name of list item
- $icon : string = null
-
relative path to list item icon
Tags
Return values
CSPortalGuiListItem —createBookmarkList()
Create bookmark list from CSPortalGuiList object
public
createBookmarkList([CSPortalGuiList $list = null ][, bool $allowEditMode = true ][, array<string|int, mixed> &$items = array() ]) : CSPortalGuiList
Parameters
- $list : CSPortalGuiList = null
-
api object filled with bookmark navigation list (optional)
- $allowEditMode : bool = true
-
whether editmode buttons and list entries may be added
- $items : array<string|int, mixed> = array()
-
this variable contains all added list items
Tags
Return values
CSPortalGuiList —createNavigationList()
Create navigation list from CSPortalGuiList object
public
createNavigationList([CSPortalGuiList $list = null ][, int $levels = 1 ], int $indentLevel) : CSPortalGuiList
Parameters
- $list : CSPortalGuiList = null
-
api object filled with information about navigation list (optional)
- $levels : int = 1
-
create list for a specific number of levels (optional)
- $indentLevel : int
-
start indent level
Tags
Return values
CSPortalGuiList —createNavigator()
Create Navigator from CSPortalGuiNavigator object
public
createNavigator([CSPortalGuiNavigator $nav = null ]) : CSPortalGuiNavigator
Parameters
- $nav : CSPortalGuiNavigator = null
Tags
Return values
CSPortalGuiNavigator —api object filled with navigation elements (optional)
getCacheOptions()
Get node's caching options
public
getCacheOptions() : CSWidgetCacheOptions
Tags
Return values
CSWidgetCacheOptions —getChildren()
Retrieve all children of this node
public
getChildren() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —list of CSWidgetNavigationNode elements
getIcon()
Retrieve path to icon of this node
public
getIcon() : string
Tags
Return values
string —getID()
Retrieve node identifier
public
getID() : string
Tags
Return values
string —getLabel()
Get node label
public
getLabel() : string
Tags
Return values
string —getLevel()
Get current node's level in the navigation map
public
getLevel() : int
Tags
Return values
int —getParent()
Retrieve parent node
public
getParent() : CSWidgetNavigationNode
Tags
Return values
CSWidgetNavigationNode —getPath()
Enter description here .
public
getPath() : string
..
Tags
Return values
string —getSearchNode()
Retrieve search node from children of node, if node is search node itself or the global search node.
public
getSearchNode() : CSWidgetNavigationNode
Tags
Return values
CSWidgetNavigationNode —getShowInList()
Check if node is shown in list
public
getShowInList() : bool
Tags
Return values
bool —isBookmarkable()
Check if node can be bookmarked
public
isBookmarkable() : bool
Tags
Return values
bool —isHiddenAsStartupNode()
Check if node is hidden from startup nodes
public
isHiddenAsStartupNode() : bool
Tags
Return values
bool —isSearchNode()
Check if node is a search node
public
isSearchNode() : bool
Tags
Return values
bool —linkNode()
Add reference to existing node as new node
public
linkNode(mixed $node[, string $label = '' ]) : CSPortalGuiNavigationNode
Parameters
- $node : mixed
- $label : string = ''
-
title of node
Tags
Return values
CSPortalGuiNavigationNode —load()
Load node content
public
load() : string
Tags
Return values
string —HTML content of node
navigateTo()
Navigate Widget to this note
public
navigateTo([array<string|int, mixed> $params = array() ][, bool $allowCaching = true ]) : string
Parameters
- $params : array<string|int, mixed> = array()
-
additional request params
- $allowCaching : bool = true
-
cache request
Tags
Return values
string —setBookmarkable()
Define if node can be bookmarked or not
public
setBookmarkable(bool $bookmarkable) : void
Parameters
- $bookmarkable : bool
-
true = bookmarkable, false = not bookmarkable
Tags
Return values
void —setBookmarkMode()
Switch to bookmark mode. This node does not have own content but will list bookmarks for a given number of levels
public
setBookmarkMode([int $levels = 1 ]) : void
Parameters
- $levels : int = 1
Tags
Return values
void —setCacheOptions()
Enhance cache options of node
public
setCacheOptions(CSWidgetCacheOptions $cacheOptions) : void
Parameters
- $cacheOptions : CSWidgetCacheOptions
-
API object containing cache options
Tags
Return values
void —setContent()
Set HTML content of node
public
setContent(string $content) : void
Parameters
- $content : string
-
HTML content of node
Tags
Return values
void —setExtendedSearch()
Set an extended search content
public
setExtendedSearch([mixed $html = '' ]) : void
Parameters
- $html : mixed = ''
-
the search content HTML as string. If it should be deaktivated, you can use the boolean value false. If you set an empty string, a click on the extended search navigates to the search node.
Tags
Return values
void —setHideAsStartupNode()
Sets whether the node should be hidden from startup nodes
public
setHideAsStartupNode(bool $hide) : void
Parameters
- $hide : bool
Tags
Return values
void —setIcon()
Set the path to the icon of this node
public
setIcon(string $icon) : void
Parameters
- $icon : string
-
path to icon file relative to portal.php
Tags
Return values
void —setLabel()
Set node label
public
setLabel(string $label) : void
Parameters
- $label : string
Tags
Return values
void —setListMode()
Switch to list mode. This node does not have own content but will list its child nodes for a given number of levels
public
setListMode([int $levels = 1 ]) : void
Parameters
- $levels : int = 1
Tags
Return values
void —setPath()
Enter description here .
public
setPath(string $path) : mixed
..
Parameters
- $path : string
-
relative path to node's implementation
Tags
Return values
mixed —setSearchbarVisible()
Set searchbar visible
public
setSearchbarVisible([bool $visible = true ]) : void
Parameters
- $visible : bool = true
-
true = visible, false = invisible
Tags
Return values
void —setShowInList()
set if node is displayed in lost or not
public
setShowInList([bool $showInList = true ][, bool $moveToLastPosition = false ]) : void
Parameters
- $showInList : bool = true
-
true = show, false = don't show
- $moveToLastPosition : bool = false
-
position node at end of list
