vB_Library_Content_Channel
extends vB_Library_Content
in package
vB_Library_Content_Channel
Tags
Table of Contents
Methods
- add() : mixed
- Adds a new channel.
- assembleContent() : mixed
- Assembles the response for detailed content
- delete() : bool
- Permanently deletes a channel
- fetchChannelByGUID() : array<string|int, mixed>
- Returns a channel record based on its node guid
- fetchChannelIdByGUID() : int
- Returns a channel id based on its node guid
- fetchTopLevelChannelIds() : array<string|int, mixed>
- Fetches the top level Channels/Categories
- getAutocomplete() : array<string|int, mixed>
- Get autocomplete results for channels.
- getBareContent() : int
- Returns the node content as an associative array. Like getFullContent but without the permissions data.
- getForumHomeChannel() : mixed
- getFullContent() : array<string|int, mixed>
- Returns the node content as an associative array
- getIndexableFromNode() : mixed
- getMainChannel() : mixed
- getUniqueUrlIdent() : string
- This creates an urlident from a title, and guarantees it will not be a duplicate
- incompleteNodeCleanup() : mixed
- This function either deletes the channel if it has no children, or fixes it.
- switchForumCategory() : bool
- Toggles the channel between acting like a forum (can have threads in it) and acting like a category (can only have subchannels in it)
- update() : mixed
Methods
add()
Adds a new channel.
public
add(mixed $data[, array<string|int, mixed> $options = ['nodeonly' => false] ]) : mixed
Parameters
- $data : mixed
- $options : array<string|int, mixed> = ['nodeonly' => false]
assembleContent()
Assembles the response for detailed content
public
assembleContent(mixed &$content[, mixed $permissions = false ]) : mixed
Parameters
- $content : mixed
- $permissions : mixed = false
Return values
mixed —formatted data
delete()
Permanently deletes a channel
public
delete(mixed $nodeid) : bool
Parameters
- $nodeid : mixed
Return values
boolfetchChannelByGUID()
Returns a channel record based on its node guid
public
fetchChannelByGUID(mixed $guid) : array<string|int, mixed>
Parameters
- $guid : mixed
Return values
array<string|int, mixed> —Channel information
fetchChannelIdByGUID()
Returns a channel id based on its node guid
public
fetchChannelIdByGUID(mixed $guid) : int
Parameters
- $guid : mixed
Return values
int —Channel id
fetchTopLevelChannelIds()
Fetches the top level Channels/Categories
public
fetchTopLevelChannelIds() : array<string|int, mixed>
Return values
array<string|int, mixed> —Array of channel information
getAutocomplete()
Get autocomplete results for channels.
public
getAutocomplete(string $searchStr, int $limitstart, int $limitnumber, bool $currentuseronly) : array<string|int, mixed>
Parameters
- $searchStr : string
-
-- Will return channels that match this as a prefix.
- $limitstart : int
-
-- Place to start in the list.
- $limitnumber : int
-
-- Place to start in the list.
- $currentuseronly : bool
-
-- only return channels the current user has access to.
Return values
array<string|int, mixed>getBareContent()
Returns the node content as an associative array. Like getFullContent but without the permissions data.
public
getBareContent(mixed $nodeids) : int
Parameters
- $nodeids : mixed
Return values
intgetForumHomeChannel()
public
getForumHomeChannel() : mixed
getFullContent()
Returns the node content as an associative array
public
getFullContent(mixed $nodeids) : array<string|int, mixed>
Parameters
- $nodeids : mixed
Return values
array<string|int, mixed>getIndexableFromNode()
public
getIndexableFromNode(mixed $content[, mixed $include_attachments = true ]) : mixed
Parameters
- $content : mixed
- $include_attachments : mixed = true
getMainChannel()
public
getMainChannel() : mixed
getUniqueUrlIdent()
This creates an urlident from a title, and guarantees it will not be a duplicate
public
getUniqueUrlIdent(mixed $title) : string
Parameters
- $title : mixed
Return values
stringincompleteNodeCleanup()
This function either deletes the channel if it has no children, or fixes it.
public
incompleteNodeCleanup(mixed $node) : mixed
Parameters
- $node : mixed
switchForumCategory()
Toggles the channel between acting like a forum (can have threads in it) and acting like a category (can only have subchannels in it)
public
switchForumCategory(bool $makeCategory, int $nodeId[, bool $force = false ]) : bool
Parameters
- $makeCategory : bool
- $nodeId : int
- $force : bool = false
-
- If true, it will force page recreation even if the category field matches
Tags
Return values
boolupdate()
public
update(mixed $nodeid, mixed $data) : mixed
Parameters
- $nodeid : mixed
- $data : mixed