vBulletin 5.6.5 API

vB_Library_Site extends vB_Library
in package

vB_Library_Site

Table of Contents

$assertor  : mixed
$channelInfo  : array<string|int, mixed>
Array of cached channelInfo, used by getChannelType
$cleanerObj  : mixed
$fields  : mixed
$instance  : mixed
$phraseCache  : array<string|int, mixed>
Cached phrases used for navbar/footer items
$requiredPhrases  : array<string|int, mixed>
Phrases that need to be cached for the navbar/footer items
$sitescache  : mixed
$emptyAllowed  : mixed
__construct()  : mixed
Initializes an Api Site object
__serialize()  : mixed
__sleep()  : mixed
__unserialize()  : mixed
__wakeup()  : mixed
clearCache()  : mixed
clearSiteCache()  : mixed
Clears the internal site cache.
getContentInstance()  : mixed
getSiteStatistics()  : array<string|int, mixed>
Returns an array of general statistics for the site
instance()  : vB_PageCache
Returns singleton instance of self.
loadFooterNavbar()  : mixed
Gets the footer navbar data
loadHeaderNavbar()  : mixed
Gets the header navbar data
monitorWords()  : mixed
Checks if the text contains monitored words, and if so, sends notifications to admins and moderators if the setting is on.
saveFooterNavbar()  : bool
Stores the footer navbar data.
saveHeaderNavbar()  : bool
Stores the header navbar data.
addPhrasesToData()  : mixed
cachePhrases()  : mixed
cleanData()  : mixed
getChannelType()  : string|false
Returns the channel type for the given channel ID
getLibraryClassNameInternal()  : mixed
hasEmptyData()  : mixed
Check if data array is empty
saveNavbarPhrase()  : mixed
addDerivedData()  : mixed
addDerivedDataToItem()  : mixed
compareGroupLists()  : bool
Returns true if any of needle exist in haystack
getNavbar()  : mixed
Gets the navbar data for the header or the footer
getPossibleTabMatchLength()  : mixed
markCurrentTab()  : mixed
removeRestrictedTabs()  : mixed
setBestMatchFromUrl()  : mixed
shouldRemoveItem()  : mixed

Properties

$assertor

protected mixed $assertor

$channelInfo

Array of cached channelInfo, used by getChannelType

protected array<string|int, mixed> $channelInfo = array()

$cleanerObj

protected mixed $cleanerObj

$fields

protected mixed $fields = array('title' => B_Cleaner::TYPE_STR, 'phrase' => B_Cleaner::TYPE_STR, 'url' => B_Cleaner::TYPE_STR, 'attr' => B_Cleaner::TYPE_STR, 'usergroups' => B_Cleaner::TYPE_ARRAY_UINT, 'newWindow' => B_Cleaner::TYPE_BOOL, 'subnav' => B_Cleaner::TYPE_ARRAY)

$instance

protected static mixed $instance = array()

$phraseCache

Cached phrases used for navbar/footer items

protected array<string|int, mixed> $phraseCache = array()

$requiredPhrases

Phrases that need to be cached for the navbar/footer items

protected array<string|int, mixed> $requiredPhrases = array()

$sitescache

protected mixed $sitescache = array()

$emptyAllowed

private mixed $emptyAllowed = array('subnav', 'usergroups', 'phrase', 'attr', 'newWindow')

Methods

__construct()

Initializes an Api Site object

public __construct() : mixed
Return values
mixed

__serialize()

public __serialize() : mixed
Return values
mixed

__sleep()

public __sleep() : mixed
Return values
mixed

__unserialize()

public __unserialize(mixed $serialized) : mixed
Parameters
$serialized : mixed
Return values
mixed

__wakeup()

public __wakeup() : mixed
Return values
mixed

clearCache()

public static clearCache() : mixed
Return values
mixed

clearSiteCache()

Clears the internal site cache.

public clearSiteCache() : mixed

WARNING: Only intended for use by unit tests. Do not use in any other context

Return values
mixed

getContentInstance()

public static getContentInstance(mixed $contenttypeid) : mixed
Parameters
$contenttypeid : mixed
Return values
mixed

getSiteStatistics()

Returns an array of general statistics for the site

public getSiteStatistics() : array<string|int, mixed>
Return values
array<string|int, mixed>

Statistics.

instance()

Returns singleton instance of self.

public static instance(mixed $class) : vB_PageCache
Parameters
$class : mixed
Return values
vB_PageCache
  • Reference to singleton instance of the cache handler

loadFooterNavbar()

Gets the footer navbar data

public loadFooterNavbar(mixed $siteId[, mixed $url = false ][, mixed $edit = false ]) : mixed
Parameters
$siteId : mixed
$url : mixed = false
$edit : mixed = false
Return values
mixed

Array of footer navbar data (Described in save method).

loadHeaderNavbar()

Gets the header navbar data

public loadHeaderNavbar(mixed $siteId[, mixed $url = false ][, mixed $edit = false ], mixed $channelId) : mixed
Parameters
$siteId : mixed
$url : mixed = false
$edit : mixed = false
$channelId : mixed
Return values
mixed

Array of header navbar data (Described in save method).

monitorWords()

Checks if the text contains monitored words, and if so, sends notifications to admins and moderators if the setting is on.

public monitorWords(mixed $text, mixed $type, mixed $nodeid[, mixed $userid = null ][, mixed $insertNotifications = true ], mixed $currentuserid) : mixed
Parameters
$text : mixed
$type : mixed
$nodeid : mixed
$userid : mixed = null
$insertNotifications : mixed = true
$currentuserid : mixed
Return values
mixed

saveFooterNavbar()

Stores the footer navbar data.

public saveFooterNavbar(mixed $siteId, mixed $data) : bool
Parameters
$siteId : mixed
$data : mixed
Return values
bool

To indicate if save was succesfully done.

saveHeaderNavbar()

Stores the header navbar data.

public saveHeaderNavbar(mixed $siteId, mixed $data) : bool
Parameters
$siteId : mixed
$data : mixed
Return values
bool

To indicate if save was succesfully done.

addPhrasesToData()

protected addPhrasesToData(mixed &$data) : mixed
Parameters
$data : mixed
Return values
mixed

cachePhrases()

protected cachePhrases([mixed $edit = false ]) : mixed
Parameters
$edit : mixed = false
Return values
mixed

cleanData()

protected cleanData(mixed $data) : mixed
Parameters
$data : mixed
Return values
mixed

getChannelType()

Returns the channel type for the given channel ID

protected getChannelType(mixed $channelId) : string|false
Parameters
$channelId : mixed
Return values
string|false

The channel type, or an false if there was a problem, for example the user doesn't have access to the channel.

getLibraryClassNameInternal()

protected static getLibraryClassNameInternal(mixed $controller) : mixed
Parameters
$controller : mixed
Return values
mixed

hasEmptyData()

Check if data array is empty

protected hasEmptyData(mixed $data) : mixed
Parameters
$data : mixed
Tags
throws
Exception

missing_required_field if there's an empty field in site data.

Return values
mixed

saveNavbarPhrase()

protected saveNavbarPhrase(mixed &$element, mixed &$phrases) : mixed
Parameters
$element : mixed
$phrases : mixed
Return values
mixed

addDerivedData()

private addDerivedData(array<string|int, mixed> &$data) : mixed
Parameters
$data : array<string|int, mixed>
Return values
mixed

addDerivedDataToItem()

private addDerivedDataToItem(array<string|int, mixed> &$item) : mixed
Parameters
$item : array<string|int, mixed>
Return values
mixed

compareGroupLists()

Returns true if any of needle exist in haystack

private compareGroupLists(array<string|int, mixed> $needle, array<string|int, mixed> $haystack) : bool

ASSUMES THAT BOTH NEEDLE AND HAYSTACK ARE SORTED ASCENDING

Parameters
$needle : array<string|int, mixed>
$haystack : array<string|int, mixed>
Return values
bool

getNavbar()

Gets the navbar data for the header or the footer

private getNavbar(mixed $type, mixed $siteId[, mixed $url = false ][, mixed $edit = false ], mixed $channelId) : mixed
Parameters
$type : mixed
$siteId : mixed
$url : mixed = false
$edit : mixed = false
$channelId : mixed
Tags
parma

string URL

Return values
mixed

Array of header/footer navbar data (Described in save method).

getPossibleTabMatchLength()

private getPossibleTabMatchLength(mixed $baseurl, mixed $baseurl_short, mixed $item, mixed $currentUrl) : mixed
Parameters
$baseurl : mixed
$baseurl_short : mixed
$item : mixed
$currentUrl : mixed
Return values
mixed

markCurrentTab()

private markCurrentTab(array<string|int, mixed> &$data, mixed $url, mixed $edit, mixed $channelId) : mixed
Parameters
$data : array<string|int, mixed>
$url : mixed
$edit : mixed
$channelId : mixed
Return values
mixed

removeRestrictedTabs()

private removeRestrictedTabs(array<string|int, mixed> &$data[, mixed $edit = false ]) : mixed
Parameters
$data : array<string|int, mixed>
$edit : mixed = false
Return values
mixed

setBestMatchFromUrl()

private setBestMatchFromUrl(array<string|int, mixed> &$data, mixed $baseurl, mixed $baseurl_short, mixed $url) : mixed
Parameters
$data : array<string|int, mixed>
$baseurl : mixed
$baseurl_short : mixed
$url : mixed
Return values
mixed

shouldRemoveItem()

private shouldRemoveItem(mixed $showAll, mixed $usergroups, array<string|int, mixed> $item) : mixed
Parameters
$showAll : mixed
$usergroups : mixed
$item : array<string|int, mixed>
Return values
mixed

Search results