class vB_Library_Phrase extends vB_Library

vB_Library_Phrase

Traits

Constants

VALID_CLASS

Properties

static protected $instance from vB_Library

Methods

__sleep()

No description

__wakeup()

No description

__construct()

No description

static vB_PageCache
instance($class)

Returns singleton instance of self.

static 
getLibraryClassNameInternal($controller)

No description

static 
getContentInstance($contenttypeid)

No description

static 
clearCache()

No description

void
save(string $fieldname, string $varname, array $data, bool $skipBuildLanguage = false)

Add a new phrase or update an existing phrase

setPhraseDate()

Resets the phrase cachebuster date.

string
cleanGuidForPhrase(string $guid)

Cleans a guid to match phrase valid class (self::VALID_CLASS).

string
replaceOptionsAndConfigValuesInPhrase(string $text)

Replaces instances of vBulletin options and config variables in a phrase with the value held in the variable.

Details

in vB_Trait_NoSerialize at line 15
__sleep()

in vB_Trait_NoSerialize at line 20
__wakeup()

in vB_Library at line 25
protected __construct()

in vB_Library at line 35
static vB_PageCache instance($class)

Returns singleton instance of self.

Parameters

$class

Return Value

vB_PageCache
  • Reference to singleton instance of the cache handler

in vB_Library at line 52
static protected getLibraryClassNameInternal($controller)

Parameters

$controller

in vB_Library at line 91
static getContentInstance($contenttypeid)

Parameters

$contenttypeid

in vB_Library at line 99
static clearCache()

at line 41
void save(string $fieldname, string $varname, array $data, bool $skipBuildLanguage = false)

Add a new phrase or update an existing phrase

Parameters

string $fieldname New Phrase Type for adding, old Phrase Type for editing
string $varname New Varname for adding, old Varname for editing
array $data Phrase data to be added or updated 'text' => Phrase text array. 'oldvarname' => Old varname for editing only 'oldfieldname' => Old fieldname for editing only 't' => 'ismaster' => 'product' => Product ID of the phrase
bool $skipBuildLanguage (Optional) Set to true to skip build_language() call. Used by the page importer to delay build_language until the old page title & desc restore queries are finished.

Return Value

void

at line 197
setPhraseDate()

Resets the phrase cachebuster date.

at line 216
string cleanGuidForPhrase(string $guid)

Cleans a guid to match phrase valid class (self::VALID_CLASS).

This is used to build phrases for import items. Example: title and description for pages - 'page_' . $guidforphrase . 'title' - 'page' . $guidforphrase . '_description'

Parameters

string $guid GUID string.

Return Value

string GUID for phrase.

at line 240
string replaceOptionsAndConfigValuesInPhrase(string $text)

Replaces instances of vBulletin options and config variables in a phrase with the value held in the variable.

This function currently supports variables such as $vbulletin->config[xxx][yyy] and $vbulletin->options[xxx], and is intended to be used in Admin CP phrases, primarily help phrases.

This function is placed here in the spirit of DRY, since it's needed in various places, and for namespacing. It's not dependent on anything else in the phrase library.

Parameters

string $text The phrase text

Return Value

string The phrase textafter replacements are done.