Skip to content
Last updated

WHMCS\Module\AbstractWidget

Class

Abstract Widget.

Methods

getId

public function getId()

Get widget id.

Returns the class name.

Returns string

getTitle

public function getTitle()

Get title.

Returns string

getDescription

public function getDescription()

Get description.

Returns string

getColumnSize

public function getColumnSize()

Get column size.

Returns int

getWeight

public function getWeight()

Get display sort weighting.

Returns int

showWrapper

public function showWrapper()

Get if panel wrapper should be shown.

Returns bool

isCachable

public function isCachable()

Get if widget allows caching.

Returns bool

isCachedPerUser

public function isCachedPerUser()

Get if widget requires caching per user.

Returns bool

getCacheExpiry

public function getCacheExpiry()

Get cache expiry time.

Returns int

getRequiredPermission

public function getRequiredPermission()

Get required permission.

Returns string

getData

public function getData()

Get data method.

A widget should override this method.

Returns array

generateOutput

public function generateOutput($data)

Generate output.

A widget should override this method.

Parameters

TypeNameDescription
array$data

Returns string

sanitizeData

public function sanitizeData($data)

Returns mixed

render

public function render($forceRefresh = false)

Render widget.

Parameters

TypeNameDescription
bool$forceRefresh

Returns string

isDraggable

public function isDraggable()

Returns bool