class vB_Api_Widget extends vB_Api

vB_Api_Widget

Traits

Constants

WIDGETCATEGORY_SYSTEM

WIDGETCATEGORY_ABSTRACT

Properties

protected bool $disabled Indicates whether the API was disabled from vB_Api
protected $disableWhiteList
protected array $disableFalseReturnOnly Contains white listed methods which return a false response when API is disabled in special scenarios like forum closed, password expiry, ip ban and others. from vB_Api
protected string $controller API Controller from vB_Api
protected vB_Database $db Database object. from vB_Api
protected $nonPlaceableWidgetCategories
protected $preloadWidgetIds
protected $pagetemplateid
protected $sectionnumber

Methods

__sleep()

No description

__wakeup()

No description

static 
getApiClassName($controller)

No description

from vB_Api
static 
getApiClassNameInternal($controller)

No description

from vB_Api
static 
getApiClass($controller, $errorCheck = true)

No description

from vB_Api
static vB_Api
instanceInternal(string $controller, bool $refresh_cache = false)

Returns an instance of the API object which doesn't handle exceptions This should only be used in other API objects, not for clients of the API

from vB_Api
static vB_Api
instance(string $controller, bool $refresh_cache = false)

Returns an instance of the API object which translates exceptions to an array Use this method for API clients.

from vB_Api
static 
clearCache()

Clears all previously loaded API objects.

from vB_Api
The
callNamed()

Call the given api function by name with a named arguments list.

from vB_Api
static string
map_vb4_input_to_vb5(string $method, array $request)

Returns vb5 api method name.

from vB_Api
static 
map_vb5_output_to_vb4(string $method, array $data)

Alters the output array in any way necessary to interface correctly with vb4.

from vB_Api
static 
map_vb5_errors_to_vb4(string $method, array $data)

Alters the error array in any way necessary to interface correctly with vb4.

from vB_Api
__construct()

No description

checkApiState($method)

This method checks whether the API method is enabled.

from vB_Api
bool
isWhiteListed(string $method)

Checks if method is white listed when API is disabled.

from vB_Api
bool
isDisableFalseReturnOnly(string $method)

Checks if method returns false response only when API is disabled.

from vB_Api
toSeoFriendly(string $str)

Replaces special characters in a given string with dashes to make the string SEO friendly

from vB_Api
none
checkHasAdminPermission(string $adminPermission)

Determines if the calling user has the given admin permission, and if not throws an exception

from vB_Api
boolean
hasAdminPermission(string $adminPermission)

Determines if the calling user has the given admin permission

from vB_Api
checkIsLoggedIn()

Determines if the calling user has the given admin permission, and if not throws an exception

from vB_Api
setController(string $controller)

Set controller

from vB_Api
inDebugMode()

No description

from vB_Api
isSystemWidget($widgetId)

No description

array
fetchConfigSchema(int $widgetid, int $widgetinstanceid = 0, int $pagetemplateid = 0, string $configtype = 'admin', int $userid = 0)

Returns the widget configuration schema for the given widget instance.

saveNewWidgetInstance($containerinstanceid, $widgetid, $pagetemplateid, $subWidgetConfig = array())

No description

fetchTabbedSubWidgetConfigs($containerinstanceid, $tabbedContainerSubModules)

No description

fetchConfigAndIsUserEditable($widgetinstanceid = 0, $widgetid = 0, $guid = '', $userid = 0, $channelId = 0, $withTemplate = false)

No description

array
fetchConfig($widgetinstanceid, $userid = 0, $channelId = 0)

Returns the final configuration for a specific widget instance.

array
preProcessConfigValues(array $widgetConfig)

Pre-compiles a few specific config values for consumption in templates.

array
fetchSearchConfig($widgetinstanceid, $userid = 0, $widgetid = 0)

Returns the final configuration for the search widget instance.

array|false
fetchAdminConfig(int $widgetinstanceid)

Returns the admin configuration for a specific widget instance.

array|false
fetchChannelConfig(int $widgetinstanceid, int $nodeId)

Returns the channel configuration for a specific widget instance.

array|false
fetchUserConfig(int $widgetinstanceid, int $userid)

Returns the user configuration for a specific widget instance.

array
fetchDefaultConfig(int $widgetinstanceid)

Returns the default configuration for a specific widget instance.

fetchDefaultConfigWithoutInstance($widgetid, $guid = '', $withTemplate = true)

No description

saveWidgetinstanceContainerinstanceid($widgetinstanceid, $containerinstanceid)

No description

bool
saveAdminConfig(int $widgetid, int $pagetemplateid, int $widgetinstanceid, array $data)

Saves an admin widget configuration for the given widget instance

bool
saveChannelConfig(int $widgetinstanceid, int $nodeid, array $data)

Saves a channel widget configuration for the given widget instance

array
saveDefaultConfig(int $widgetid, array $data)

Saves the 'default' config for a widget; updates the widgetdefinitions default field currently only used for customized_copy widgets

array
cleanWidgetConfigData(int $widgetid, array $data, bool $allowArbitraryData)

Cleans widget config data

array|false
fetchWidget(int $widgetid)

Returns the basic widget data for a widget

array
fetchWidgets(array $widgetids = array(), bool $removeNonPlaceableWidgets = false)

Returns the basic widget data for multiple widgets

array
addWidgetTitles(array $widgets)

Adds the correct (phrased) widget titles to each widget in the array

checkProductStatus($widgets, $depth = 0)

No description

static 
compareWidgets($widget1, $widget2)

No description

array
fetchWidgetInstances(array $widgetInstanceIds)

Returns multiple widget instances

array
fetchWidgetInstancesByPageTemplateId($pagetemplateid, $sectionnumber = -1, $channelId = 0, $admincheck = false)

Returns all widget instances that are associated with the given page template id. These are the widget instances that should shown on that page template.

array
fetchHierarchicalWidgetInstancesByPageTemplateId($pagetemplateid, $channelId = 0, $admincheck = false)

Returns all widget instances that are associated with the given page template id in a hierarchical array indexed by section number.

array
fetchLayoutSectionInfo(int $pagetemplateid, int $channelId = 0)

Returns an array of info, including the widget instances, to loop over and display all the layout sections.

false|int
deleteWidgetInstance(int $widgetInstanceId)

Deletes a widget instance

false|int
deleteWidgetInstances(array $widgetInstanceIds, $updateParents = false)

Deletes multiple widget instances

int
saveChannel($nodeid, array $data)

Saves (inserts/updates) one channel record. Used by {see saveChannelWidgetConfig, saveChannels}

int
saveChannelPageTemplate(int $pagetemplateid, int $nodeid)

Creates a page template record for a channel. Used by {see saveChannelWidgetConfig, saveChannels}

array
saveChannels($channels, $parentid = 1, $channelIds)

Recursively saves all channels in the Channel Widget Used by {see saveChannelWidgetConfig}

fetchChannelWidgetAdminConfig($channelIds)

Returns the structure which was previously stored in the adminconfig field of widgetinstancetable

fetchPageManagerForums()

No description

fetchPageManagerGroups($channel = 'groups', $page = 1)

No description

channelDisplaySort($ch1, $ch2)

No description

assembleChannelConfig($nodes)

No description

assemblePageManagerChannelsConfig($nodes)

No description

array
saveForums(array $data)

Saves the configuration for the Channel Widget, including creating/saving channels as necessary.

array
saveChannelWidgetConfig(array $data)

Saves the configuration for the Channel Widget, including creating/saving channels as necessary.

string
saveSearchWidgetConfig(array $data)

Saves the configuration for the Search Widget,

renameWidget($widgetId, $newtitle)

Rename custom widget

int
_getNewPageTemplateId()

Generates a new page template ID for the new page template that that widgets are being configured for. Needed to be able to generate a widget instance ID for the new widget instance.

int
_getNewWidgetInstanceId($widgetid, $pagetemplateid, $containerinstanceid = 0)

Generates a new widget instance ID for the widget instance being configured.

array
_getWidgetInstance(int $widgetinstanceid)

Returns stored widget instance data for the given widget instance ID

array
_getWidgetConfigFields(int $widgetid, int $widgetinstanceid = 0, string $configtype = '', int $userid = 0)

Returns the configuration fields needed to configure a widget of this type.

array
getWidgetDefinition(int $widgetid)

fetches the rows from the widgetdefinition table for a widgetid

array
_getWidgetDefinition(int $widgetid)

Returns the config fields that define a widget

array
_getChannelSelectOptions()

Gets the channel select options for the 'ChannelSelect' config type

array
_doGetChannelSelectOptions(array $channels, int $indent = 0)

Gets the channel select options for the 'ChannelSelect' config type Recursive function, only called from _getChannelSelectOptions

array
_getProfileFieldSelectOptions()

Gets the profile field select options for the 'ProfileFieldSelect' config type

array
_getContentTypeSelectOptions()

Gets the content type select options for the 'ContentTypeSelect' config type

_cmpWigetDefFields($f1, $f2)

compare function for widget definition sorting

_writeDebugOutput(mixed $output)

Writes debugging output to the filesystem for AJAX calls

array
getWidgetList($where = array())

Returns widget & widget definition data (e.g. for xml export)

fetchWidgetInstanceTemplates($modules)

No description

fetchWidgetGuidToWidgetidMap()

No description

Details

in vB_Trait_NoSerialize at line 15
__sleep()

in vB_Trait_NoSerialize at line 20
__wakeup()

in vB_Api at line 63
static getApiClassName($controller)

Parameters

$controller

in vB_Api at line 69
static protected getApiClassNameInternal($controller)

Parameters

$controller

in vB_Api at line 97
static protected getApiClass($controller, $errorCheck = true)

Parameters

$controller
$errorCheck

in vB_Api at line 177
static vB_Api instanceInternal(string $controller, bool $refresh_cache = false)

Returns an instance of the API object which doesn't handle exceptions This should only be used in other API objects, not for clients of the API

Parameters

string $controller -- name of the API controller to load
bool $refresh_cache -- true if we want to force the cache to update with a new api object primarily intended for testing

Return Value

vB_Api

in vB_Api at line 203
static vB_Api instance(string $controller, bool $refresh_cache = false)

Returns an instance of the API object which translates exceptions to an array Use this method for API clients.

Parameters

string $controller -- name of the API controller to load
bool $refresh_cache -- true if we want to force the cache to update with a new api object primarily intended for testing

Return Value

vB_Api

in vB_Api at line 237
static clearCache()

Clears all previously loaded API objects.

Intended for use in tests where the loading pattern can cause issues with objects that cache thier own data.

in vB_Api at line 259
The callNamed()

Call the given api function by name with a named arguments list.

Used primarily to translate REST requests into API calls.

Return Value

The return of the method or an error if the method doesn't exist, or is static, a constructor or destructor, or otherwise shouldn't be callable as and API method. It is also an error if the value of a paramater is not provided and that parameter doesn't have a default value.

in vB_Api at line 313
static string map_vb4_input_to_vb5(string $method, array $request)

Returns vb5 api method name.

May alter request array.

Parameters

string $method -- vb4 method name
array $request -- $_REQUEST array for this api request

Return Value

string

in vB_Api at line 497
static map_vb5_output_to_vb4(string $method, array $data)

Alters the output array in any way necessary to interface correctly with vb4.

Parameters

string $method -- vb4 method name
array $data -- output array from vb5

in vB_Api at line 545
static map_vb5_errors_to_vb4(string $method, array $data)

Alters the error array in any way necessary to interface correctly with vb4.

Parameters

string $method -- vb4 method name
array $data -- error array from vb5

at line 40
protected __construct()

in vB_Api at line 631
checkApiState($method)

This method checks whether the API method is enabled.

For extensions check make sure $controller property is already set.

Parameters

$method

in vB_Api at line 657
protected bool isWhiteListed(string $method)

Checks if method is white listed when API is disabled.

Parameters

string $method API method to check.

Return Value

bool Indicates whether method is or is not a white list.

in vB_Api at line 685
protected bool isDisableFalseReturnOnly(string $method)

Checks if method returns false response only when API is disabled.

Parameters

string $method API method to check.

Return Value

bool Indicates whether method returns false response only.

in vB_Api at line 712
protected toSeoFriendly(string $str)

Replaces special characters in a given string with dashes to make the string SEO friendly

Parameters

string $str The string to be converted

in vB_Api at line 734
protected none checkHasAdminPermission(string $adminPermission)

Determines if the calling user has the given admin permission, and if not throws an exception

Checks for: * A valid CP Session * The passed adminpermission.

Parameters

string $adminPermission The admin permission to check

Return Value

none

Exceptions

inlinemodauth_required -- The current session is not a mod/admin session
nopermission_loggedin -- The user does not have the given permission
no_permission -- The user is not logged in at all.

in vB_Api at line 753
protected boolean hasAdminPermission(string $adminPermission)

Determines if the calling user has the given admin permission

Useful if you need to know if the calling user but do not care why they do not have that permission. Generally useful if there is a behavior difference between admins and non admins, but the call can be processed for either.

Parameters

string $adminPermission The admin permission to check

Return Value

boolean true if checks pass, false otherwise

in vB_Api at line 807
protected checkIsLoggedIn()

Determines if the calling user has the given admin permission, and if not throws an exception

in vB_Api at line 821
protected setController(string $controller)

Set controller

Parameters

string $controller Controller name

in vB_Api at line 831
protected inDebugMode()

at line 52
isSystemWidget($widgetId)

Parameters

$widgetId

at line 90
array fetchConfigSchema(int $widgetid, int $widgetinstanceid = 0, int $pagetemplateid = 0, string $configtype = 'admin', int $userid = 0)

Returns the widget configuration schema for the given widget instance.

If no widget instance ID is given, one is created. If no page template ID is given, one is created (to be able to create the widget instance). If the widget instance ID is given, the returned config fields will contain the current values of the configured widget instance for the config type specified.

Parameters

int $widgetid The widget ID for this widget instance
int $widgetinstanceid The widget instance ID that is to be configured (can be zero)
int $pagetemplateid The page template ID that this widget instance belongs to (can be zero)
string $configtype Specifies a config type of either "user" or "admin"
int $userid The user ID to fetch the user config from, if config type is "user" (optional)

Return Value

array An array containing widgetid, widgetinstanceid, pagetemplateid, and an array of config fields to generate the edit configuration form

at line 131
saveNewWidgetInstance($containerinstanceid, $widgetid, $pagetemplateid, $subWidgetConfig = array())

Parameters

$containerinstanceid
$widgetid
$pagetemplateid
$subWidgetConfig

at line 162
fetchTabbedSubWidgetConfigs($containerinstanceid, $tabbedContainerSubModules)

Parameters

$containerinstanceid
$tabbedContainerSubModules

at line 282
fetchConfigAndIsUserEditable($widgetinstanceid = 0, $widgetid = 0, $guid = '', $userid = 0, $channelId = 0, $withTemplate = false)

Parameters

$widgetinstanceid
$widgetid
$guid
$userid
$channelId
$withTemplate

at line 314
array fetchConfig($widgetinstanceid, $userid = 0, $channelId = 0)

Returns the final configuration for a specific widget instance.

Parameters

$widgetinstanceid
$userid
$channelId

Return Value

array An associative array of the widget config items and their values

at line 372
protected array preProcessConfigValues(array $widgetConfig)

Pre-compiles a few specific config values for consumption in templates.

This greatly simplifies some of the template logic needed.

Parameters

array $widgetConfig Array of config values

Return Value

array Array of config values with pre-processed items added.

at line 411
array fetchSearchConfig($widgetinstanceid, $userid = 0, $widgetid = 0)

Returns the final configuration for the search widget instance.

Parameters

$widgetinstanceid
$userid
$widgetid

Return Value

array An associative array of the widget config items and their values

at line 455
array|false fetchAdminConfig(int $widgetinstanceid)

Returns the admin configuration for a specific widget instance.

Parameters

int $widgetinstanceid The widget instance ID

Return Value

array|false An associative array of the widget config items and their values False if there is no admin config for this widget

at line 489
array|false fetchChannelConfig(int $widgetinstanceid, int $nodeId)

Returns the channel configuration for a specific widget instance.

Parameters

int $widgetinstanceid The widget instance ID
int $nodeId The channel ID

Return Value

array|false An associative array of the widget config items and their values, or false if there is no channel config for this widget and channel.

at line 563
array|false fetchUserConfig(int $widgetinstanceid, int $userid)

Returns the user configuration for a specific widget instance.

Parameters

int $widgetinstanceid The widget instance ID
int $userid The user ID

Return Value

array|false An associative array of the widget config items and their values, or false if there is no user config for this widget and user.

at line 634
array fetchDefaultConfig(int $widgetinstanceid)

Returns the default configuration for a specific widget instance.

Parameters

int $widgetinstanceid The widget instance ID

Return Value

array An associative array of the widget config items and their values

at line 671
fetchDefaultConfigWithoutInstance($widgetid, $guid = '', $withTemplate = true)

Parameters

$widgetid
$guid
$withTemplate

at line 739
saveWidgetinstanceContainerinstanceid($widgetinstanceid, $containerinstanceid)

Parameters

$widgetinstanceid
$containerinstanceid

at line 772
bool saveAdminConfig(int $widgetid, int $pagetemplateid, int $widgetinstanceid, array $data)

Saves an admin widget configuration for the given widget instance

Parameters

int $widgetid The widget ID for this widget instance
int $pagetemplateid The page template ID that this widget instance belongs to
int $widgetinstanceid The widget instance ID that is being configured
array $data An associative array of widget configuration data

Return Value

bool Whether or not the widget configuration was saved.

at line 836
bool saveChannelConfig(int $widgetinstanceid, int $nodeid, array $data)

Saves a channel widget configuration for the given widget instance

Parameters

int $widgetinstanceid The widget instance ID that is being configured
int $nodeid The channel ID that is being configured
array $data An associative array of widget configuration data

Return Value

bool Whether or not the widget configuration was saved.

at line 907
array saveDefaultConfig(int $widgetid, array $data)

Saves the 'default' config for a widget; updates the widgetdefinitions default field currently only used for customized_copy widgets

Parameters

int $widgetid widget id
array $data config data for the widget

Return Value

array

at line 1024
protected array cleanWidgetConfigData(int $widgetid, array $data, bool $allowArbitraryData)

Cleans widget config data

Parameters

int $widgetid The widget ID for this widget instance
array $data An associative array of widget configuration data
bool $allowArbitraryData Whether or not permit arbitrary config data for this widget

Return Value

array The cleaned widget data

at line 1182
array|false fetchWidget(int $widgetid)

Returns the basic widget data for a widget

Parameters

int $widgetid Widget ID

Return Value

array|false The array of widget data, or false on failure

at line 1203
array fetchWidgets(array $widgetids = array(), bool $removeNonPlaceableWidgets = false)

Returns the basic widget data for multiple widgets

Parameters

array $widgetids (optional) Array of integer widget IDs, if you don't specify any widget ids, they will all be returned
bool $removeNonPlaceableWidgets (optional) If true, any widgets that can't be placed on a layout by the user will be filtered out. Currently filters out System widgets when not in debug mode, and Abstract widgets

Return Value

array The array of widget data, indexed by widgetid, empty on failure

at line 1341
protected array addWidgetTitles(array $widgets)

Adds the correct (phrased) widget titles to each widget in the array

Parameters

array $widgets Array of widgets

Return Value

array The same array of widgets with the title phrases added.

at line 1350
protected checkProductStatus($widgets, $depth = 0)

Parameters

$widgets
$depth

at line 1388
static protected compareWidgets($widget1, $widget2)

Parameters

$widget1
$widget2

at line 1400
array fetchWidgetInstances(array $widgetInstanceIds)

Returns multiple widget instances

Parameters

array $widgetInstanceIds Array of integer widget instance IDs

Return Value

array The array of widget instance data, indexed by widgetinstanceid, empty on failure

at line 1683
array fetchWidgetInstancesByPageTemplateId($pagetemplateid, $sectionnumber = -1, $channelId = 0, $admincheck = false)

Returns all widget instances that are associated with the given page template id. These are the widget instances that should shown on that page template.

Parameters

$pagetemplateid
$sectionnumber
$channelId
$admincheck

Return Value

array The array of widget instance data, empty on failure

at line 1933
array fetchHierarchicalWidgetInstancesByPageTemplateId($pagetemplateid, $channelId = 0, $admincheck = false)

Returns all widget instances that are associated with the given page template id in a hierarchical array indexed by section number.

These are the widget instances that should shown on that page template.

Parameters

$pagetemplateid
$channelId
$admincheck

Return Value

array The array of sections with widget instance data, empty on failure

at line 1966
array fetchLayoutSectionInfo(int $pagetemplateid, int $channelId = 0)

Returns an array of info, including the widget instances, to loop over and display all the layout sections.

Parameters

int $pagetemplateid Page template ID
int $channelId Channel ID (optional)

Return Value

array The array of sections with widget instance data, empty on failure

at line 2086
false|int deleteWidgetInstance(int $widgetInstanceId)

Deletes a widget instance

Parameters

int $widgetInstanceId Widget instance ID to delete

Return Value

false|int False or 0 on failure, 1 on success

at line 2098
false|int deleteWidgetInstances(array $widgetInstanceIds, $updateParents = false)

Deletes multiple widget instances

Parameters

array $widgetInstanceIds
$updateParents

Return Value

false|int False or 0 on failure, number of rows deleted on success

at line 2117
protected int saveChannel($nodeid, array $data)

Saves (inserts/updates) one channel record. Used by {see saveChannelWidgetConfig, saveChannels}

Parameters

$nodeid
array $data

Return Value

int Channel Node ID

at line 2182
protected int saveChannelPageTemplate(int $pagetemplateid, int $nodeid)

Creates a page template record for a channel. Used by {see saveChannelWidgetConfig, saveChannels}

Parameters

int $pagetemplateid Page template ID
int $nodeid Channel Node ID

Return Value

int New Page template ID

at line 2228
protected array saveChannels($channels, $parentid = 1, $channelIds)

Recursively saves all channels in the Channel Widget Used by {see saveChannelWidgetConfig}

Parameters

$channels
$parentid
$channelIds

Return Value

array Channel Information

at line 2320
fetchChannelWidgetAdminConfig($channelIds)

Returns the structure which was previously stored in the adminconfig field of widgetinstancetable

Parameters

$channelIds

at line 2331
fetchPageManagerForums()

at line 2350
fetchPageManagerGroups($channel = 'groups', $page = 1)

Parameters

$channel
$page

at line 2387
protected channelDisplaySort($ch1, $ch2)

Parameters

$ch1
$ch2

at line 2414
protected assembleChannelConfig($nodes)

Parameters

$nodes

at line 2493
protected assemblePageManagerChannelsConfig($nodes)

Parameters

$nodes

at line 2588
array saveForums(array $data)

Saves the configuration for the Channel Widget, including creating/saving channels as necessary.

Parameters

array $data An array of channel hierarchy information

Return Value

array Array of information to display the channel widget config interface

at line 2613
array saveChannelWidgetConfig(array $data)

Saves the configuration for the Channel Widget, including creating/saving channels as necessary.

Parameters

array $data An array of channel hierarchy information

Return Value

array Array of information to display the channel widget config interface

at line 2665
string saveSearchWidgetConfig(array $data)

Saves the configuration for the Search Widget,

Parameters

array $data An array of search information

Return Value

string search JSON string

at line 2792
renameWidget($widgetId, $newtitle)

Rename custom widget

Parameters

$widgetId
$newtitle

at line 2836
protected int _getNewPageTemplateId()

Generates a new page template ID for the new page template that that widgets are being configured for. Needed to be able to generate a widget instance ID for the new widget instance.

Return Value

int New page template ID

at line 2863
protected int _getNewWidgetInstanceId($widgetid, $pagetemplateid, $containerinstanceid = 0)

Generates a new widget instance ID for the widget instance being configured.

Parameters

$widgetid
$pagetemplateid
$containerinstanceid

Return Value

int New widget instance ID

at line 2890
protected array _getWidgetInstance(int $widgetinstanceid)

Returns stored widget instance data for the given widget instance ID

Parameters

int $widgetinstanceid Widget instance ID

Return Value

array Array of widget instance data

at line 2918
protected array _getWidgetConfigFields(int $widgetid, int $widgetinstanceid = 0, string $configtype = '', int $userid = 0)

Returns the configuration fields needed to configure a widget of this type.

If the widget instance ID is given, it will also set the current values for the config fields to the current configured values for the widget instance.

Parameters

int $widgetid The widget ID
int $widgetinstanceid The widget instance ID that is to be configured (optional)
string $configtype The config type ("user" or "admin"), used if widget instance ID is given (optional)
int $userid The user ID, used if the config type is "user" (optional)

Return Value

array An associative array, keyed by the config field name and containing name, label, type, default value, is editable, and is required with which the config fields can be displayed.

at line 2965
array getWidgetDefinition(int $widgetid)

fetches the rows from the widgetdefinition table for a widgetid

Parameters

int $widgetid

Return Value

array

at line 2993
protected array _getWidgetDefinition(int $widgetid)

Returns the config fields that define a widget

Parameters

int $widgetid The widget ID

Return Value

array The config fields

at line 3179
protected array _getChannelSelectOptions()

Gets the channel select options for the 'ChannelSelect' config type

Return Value

array Channel select option data

at line 3213
protected array _doGetChannelSelectOptions(array $channels, int $indent = 0)

Gets the channel select options for the 'ChannelSelect' config type Recursive function, only called from _getChannelSelectOptions

Parameters

array $channels Channel data
int $indent how many times to indent this channel name

Return Value

array Channel select option data

at line 3252
protected array _getProfileFieldSelectOptions()

Gets the profile field select options for the 'ProfileFieldSelect' config type

Return Value

array Profile field select option data

at line 3296
protected array _getContentTypeSelectOptions()

Gets the content type select options for the 'ContentTypeSelect' config type

Return Value

array Content type select option data

at line 3344
protected _cmpWigetDefFields($f1, $f2)

compare function for widget definition sorting

Parameters

$f1
$f2

at line 3359
protected _writeDebugOutput(mixed $output)

Writes debugging output to the filesystem for AJAX calls

Parameters

mixed $output Output to write

at line 3372
array getWidgetList($where = array())

Returns widget & widget definition data (e.g. for xml export)

Parameters

$where

Return Value

array WHERE array

at line 3392
fetchWidgetInstanceTemplates($modules)

Parameters

$modules

at line 3406
fetchWidgetGuidToWidgetidMap()