class vB_Xml_Import_Theme extends vB_Xml_Import

Traits

Constants

OPTION_OVERWRITE

OPTION_IGNOREMISSINGROUTES

OPTION_IGNOREMISSINGPARENTS

OPTION_ADDWIDGETS

OPTION_OVERWRITECOLUMN

TYPE_ROUTE

TYPE_CHANNEL

TYPE_PAGE

TYPE_PAGETEMPLATE

TYPE_WIDGET

TYPE_THEME

TYPE_SCREENLAYOUT

DEFAULT_GRANDPARENT_GUID

DEFAULT_PARENT_GUID

DEFAULT_THEME_GUID

Properties

protected vB_dB_Assertor $db from vB_Xml_Import
protected int $options from vB_Xml_Import
protected array $parsedXML from vB_Xml_Import
protected $productid from vB_Xml_Import
static protected array $importedElements from vB_Xml_Import
protected string $overwriteColumn Column to overwrite, if OPTION_OVERWRITECOLUMN is set from vB_Xml_Import
static protected $themeGrandParent
static protected $themeParent

Methods

__sleep()

No description

__wakeup()

No description

__construct($productid = 'vbulletin', $options = 9)

No description

setOptions($options)

No description

setOverwriteColumn(string $column)

Sets the column to overwrite, if OPTION_OVERWRITECOLUMN is set

static 
setImportedId($type, $guid, $newid)

Stores an imported element with the new id

static int
getImportedId(string $type, string $guid = NULL)

Returns the id for an imported element

importFromFile(string $filepath, string $guid = false)

Imports objects from the specified filepath

importFromParsedXML(array $parsedXML)

Imports objects from parsed XML starting at the base of the relevant objects.

import($startat = 0, $perpage = 1, $overwrite = false, $styleid = -1, $anyversion = false, $extra = array())

Import objects

static 
parseFile($filepath)

No description

array
replacePhrasePlaceholdersInArray(array $array)

If an array value is of the form "phrase:" replace it with the actual phrase.

importAdminCP($parsedXML, $startat = 0, $perpage = 1, $overwrite = false, $styleid = -1, $anyversion = false, $extra = array())

No description

doInsertTheme($title, $parentid, $userselect, $displayorder, $guid, $icon = '', $previewImage = '', $styleattributes = vB_Library_Style::ATTR_DEFAULT, $dateline = null)

No description

int|bool
uploadThemeImageData(binary $imageData)

Uploads a theme image (icon or preview image) from the image data

int|bool
uploadThemeImage(string $encodedImageData)

Uploads a theme image (icon or preview image)

uploadImageStreamStringToFiledata($imageContent, $prefix = 'vb_')

No description

getDefaultGrandParentTheme()

No description

getDefaultParentTheme()

No description

importThemes($perpage = 1, $overwrite = false)

No description

Details

in vB_Trait_NoSerialize at line 15
__sleep()

in vB_Trait_NoSerialize at line 20
__wakeup()

in vB_Xml_Import at line 69
__construct($productid = 'vbulletin', $options = 9)

Parameters

$productid
$options

in vB_Xml_Import at line 76
setOptions($options)

Parameters

$options

in vB_Xml_Import at line 86
setOverwriteColumn(string $column)

Sets the column to overwrite, if OPTION_OVERWRITECOLUMN is set

Parameters

string $column Column name

in vB_Xml_Import at line 137
static protected setImportedId($type, $guid, $newid)

Stores an imported element with the new id

Parameters

$type
$guid
$newid

in vB_Xml_Import at line 148
static int getImportedId(string $type, string $guid = NULL)

Returns the id for an imported element

Parameters

string $type
string $guid

Return Value

int

in vB_Xml_Import at line 173
importFromFile(string $filepath, string $guid = false)

Imports objects from the specified filepath

Parameters

string $filepath
string $guid Only import the record associated with this guid

in vB_Xml_Import at line 183
importFromParsedXML(array $parsedXML)

Imports objects from parsed XML starting at the base of the relevant objects.

Parameters

array $parsedXML

at line 110
protected import($startat = 0, $perpage = 1, $overwrite = false, $styleid = -1, $anyversion = false, $extra = array())

Import objects

Parameters

$startat
$perpage
$overwrite
$styleid
$anyversion
$extra

in vB_Xml_Import at line 194
static parseFile($filepath)

Parameters

$filepath

in vB_Xml_Import at line 218
protected array replacePhrasePlaceholdersInArray(array $array)

If an array value is of the form "phrase:" replace it with the actual phrase.

Parameters

array $array

Return Value

array The array with phrases replaced.

at line 26
importAdminCP($parsedXML, $startat = 0, $perpage = 1, $overwrite = false, $styleid = -1, $anyversion = false, $extra = array())

Parameters

$parsedXML
$startat
$perpage
$overwrite
$styleid
$anyversion
$extra

at line 314
protected doInsertTheme($title, $parentid, $userselect, $displayorder, $guid, $icon = '', $previewImage = '', $styleattributes = vB_Library_Style::ATTR_DEFAULT, $dateline = null)

Parameters

$title
$parentid
$userselect
$displayorder
$guid
$icon
$previewImage
$styleattributes
$dateline

at line 382
int|bool uploadThemeImageData(binary $imageData)

Uploads a theme image (icon or preview image) from the image data

Parameters

binary $imageData Image data to upload

Return Value

int|bool Filedataid for the image or false if the image could not be uploaded.

at line 404
protected int|bool uploadThemeImage(string $encodedImageData)

Uploads a theme image (icon or preview image)

Parameters

string $encodedImageData Base64-encoded image data.

Return Value

int|bool Filedataid for the image or false if the image could not be uploaded.

at line 436
protected uploadImageStreamStringToFiledata($imageContent, $prefix = 'vb_')

Parameters

$imageContent
$prefix

at line 504
getDefaultGrandParentTheme()

at line 548
getDefaultParentTheme()

at line 597
importThemes($perpage = 1, $overwrite = false)

Parameters

$perpage
$overwrite