vB_Library_Content_Redirect
extends vB_Library_Content_Text
in package
vB_Library_Content_Redirect
Tags
Table of Contents
Methods
- add() : array<string|int, mixed>
- Creates a new redirect node
- assembleContent() : mixed
- Assembles the response for detailed content
- autoPopulatePreviewImage() : mixed
- DEPRECATED: This needs to remain until the corresponding API function is removed
- deleteExpiredRedirects() : mixed
- Deletes all expired redirects
- getAutoparseLinks() : mixed
- Get the actual auto parse links values based on the request and context
- getFullContent() : content
- Returns the node content as an associative array with fullcontent
- getIndexableFromNode() : mixed
- getNodeDescription() : mixed
- getQuotes() : array<string|int, mixed>|string
- This returns a string with quoted strings in bbcode format.
- getQuotesFromNodes() : mixed
- Helper function to allow getQuotes in the API and Library classes to generate the node list independantly (so that the API can check perms without loading the nodes twice).
- mergeContent() : type
- Performs the merge of content and updates the node.
- mergeContentInfo() : mixed
- Adds content info to $result so that merged content can be edited.
- parseAndStrip() : mixed
- postBbcodeParseCleanRawtext() : mixed
- Cleans the input in the $data array, specifically *after* any html/wysiwyg -> bbcode parsing.
- update() : bool
- Updates a text node.
Methods
add()
Creates a new redirect node
public
add(mixed $data[, array<string|int, mixed> $options = [] ][, mixed $convertWysiwygTextToBbcode = false ]) : array<string|int, mixed>
Parameters
- $data : mixed
- $options : array<string|int, mixed> = []
- $convertWysiwygTextToBbcode : mixed = false
Return values
array<string|int, mixed> —-- nodeid (int) -- success (bool) -- cacheEvents (array of strings) -- nodeVals (array of field => value) -- attachments (array of attachment records)
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
autoPopulatePreviewImage()
DEPRECATED: This needs to remain until the corresponding API function is removed
public
autoPopulatePreviewImage(mixed $nodeId[, array<string|int, mixed> $node = null ]) : mixed
Populates the previewimage field for this node. To be called after the node is saved and the attachments added.
Finds the first image in the post text that can be used as a previewimage (uploaded here), or uses the first image attachment.
Parameters
- $nodeId : mixed
- $node : array<string|int, mixed> = null
-
(optional) Node content array returned by getFullContent
Tags
deleteExpiredRedirects()
Deletes all expired redirects
public
deleteExpiredRedirects() : mixed
getAutoparseLinks()
Get the actual auto parse links values based on the request and context
public
getAutoparseLinks( $parents, $autoparselinks) : mixed
For the moment we assume that we us autoparse if
- It is requested by the caller AND
- It is allowed by channel context
There is currently no "force" auto parse. Currently the channel option is not hierarchical, we'll check the containing channel at the lowest level and allow autoparse if that channel allows it regardless of if the parents allow it or not (currently we only have an on/off flag and would need on/off/default to handle hierachy in a reasonable way since we might want to allow it for a child while prohibiting it at the parent level or vice versa.
Parameters
getFullContent()
Returns the node content as an associative array with fullcontent
public
getFullContent(int|array<string|int, mixed> $nodes) : content
Parameters
- $nodes : int|array<string|int, mixed>
-
The id in the primary table
Return values
content —for requested nodes.
getIndexableFromNode()
public
getIndexableFromNode(mixed $content[, mixed $include_attachments = true ]) : mixed
Parameters
- $content : mixed
- $include_attachments : mixed = true
getNodeDescription()
public
getNodeDescription(mixed $data, mixed $convertWysiwygTextToBbcode) : mixed
Parameters
- $data : mixed
- $convertWysiwygTextToBbcode : mixed
getQuotes()
This returns a string with quoted strings in bbcode format.
public
getQuotes(array<string|int, mixed>|int $nodeids) : array<string|int, mixed>|string
Parameters
- $nodeids : array<string|int, mixed>|int
Return values
array<string|int, mixed>|string —either the quote for the node or an array of $nodeid => $quotes for the array of nodes
getQuotesFromNodes()
Helper function to allow getQuotes in the API and Library classes to generate the node list independantly (so that the API can check perms without loading the nodes twice).
public
getQuotesFromNodes(array<string|int, mixed> $nodes) : mixed
Parameters
- $nodes : array<string|int, mixed>
-
-- array of nodes arrays from getContent (API or Library version) does not accept a single node array
mergeContent()
Performs the merge of content and updates the node.
public
mergeContent(type $data) : type
Parameters
- $data : type
Return values
typemergeContentInfo()
Adds content info to $result so that merged content can be edited.
public
mergeContentInfo(array<string|int, mixed> &$result, array<string|int, mixed> $content) : mixed
Parameters
- $result : array<string|int, mixed>
- $content : array<string|int, mixed>
parseAndStrip()
public
parseAndStrip(mixed $text[, mixed $wysiwyg = true ]) : mixed
Parameters
- $text : mixed
- $wysiwyg : mixed = true
postBbcodeParseCleanRawtext()
Cleans the input in the $data array, specifically *after* any html/wysiwyg -> bbcode parsing.
public
postBbcodeParseCleanRawtext(array<string|int, mixed> &$data) : mixed
Parameters
- $data : array<string|int, mixed>
-
Array of fieldname => data pairs, passed by reference.
update()
Updates a text node.
public
update(mixed $nodeid, mixed $data[, mixed $convertWysiwygTextToBbcode = true ]) : bool
Parameters
- $nodeid : mixed
- $data : mixed
- $convertWysiwygTextToBbcode : mixed = true