vBulletin v6.0.4

vB_Library_Content_Report extends vB_Library_Content_Text
in package

vB_Library_Content_Report

Tags
access

public

Table of Contents

Methods

add()  : array<string|int, mixed>
Adds a new node.
assembleContent()  : mixed
Assembles the response for detailed content
autoPopulatePreviewImage()  : mixed
DEPRECATED: This needs to remain until the corresponding API function is removed
bulkdelete()  : void
Delete one or more reports
getAutoparseLinks()  : mixed
Get the actual auto parse links values based on the request and context
getFullContent()  : array<string|int, mixed>
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.
openClose()  : void
Open or close reports
parseAndStrip()  : mixed
postBbcodeParseCleanRawtext()  : mixed
Cleans the input in the $data array, specifically *after* any html/wysiwyg -> bbcode parsing.
update()  : void
Report is not allowed to be updated.
validate()  : mixed

Methods

add()

Adds a new node.

public add(mixed $data[, array<string|int, mixed> $options = array() ][, mixed $convertWysiwygTextToBbcode = true ]) : array<string|int, mixed>
Parameters
$data : mixed
$options : array<string|int, mixed> = array()
$convertWysiwygTextToBbcode : mixed = true
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
deprecated

Superceded by getPreviewImage

bulkdelete()

Delete one or more reports

public bulkdelete( $nodeids) : void
Parameters
$nodeids :
Tags
throws
vB_Exception_Api

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

  1. It is requested by the caller AND
  2. 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
$parents :

-- the parents array the first element should be either the node itself (for updates) or the node's parent (for adds). It will work either way.

$autoparselinks :

-- the requested autoparse value

getFullContent()

Returns the node content as an associative array with fullcontent

public getFullContent(int $nodeid) : array<string|int, mixed>
Parameters
$nodeid : int
Return values
array<string|int, mixed>

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
type

mergeContentInfo()

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>

openClose()

Open or close reports

public openClose(array<string|int, mixed> $nodeids, string $op) : void
Parameters
$nodeids : array<string|int, mixed>

Array of node IDs

$op : string

'open' or 'close'

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()

Report is not allowed to be updated.

public update(mixed $nodeid, mixed $data[, mixed $convertWysiwygTextToBbcode = true ]) : void
Parameters
$nodeid : mixed
$data : mixed
$convertWysiwygTextToBbcode : mixed = true
Tags
throws
vB_Exception_Api

validate()

public validate(mixed $data[, mixed $action = self::ACTION_ADD ][, mixed $nodeid = false ][, mixed $nodes = false ][, mixed $userid = null ]) : mixed
Parameters
$data : mixed
$action : mixed = self::ACTION_ADD
$nodeid : mixed = false
$nodes : mixed = false
$userid : mixed = null

        
On this page

Search results