# WHMCS\Module\AbstractWidget

`Class`

Abstract Widget.

## Methods

### getId

```php
public function getId()
```

Get widget id.

Returns the class name.

**Returns** `string`

### getTitle

```php
public function getTitle()
```

Get title.

**Returns** `string`

### getDescription

```php
public function getDescription()
```

Get description.

**Returns** `string`

### getColumnSize

```php
public function getColumnSize()
```

Get column size.

**Returns** `int`

### getWeight

```php
public function getWeight()
```

Get display sort weighting.

**Returns** `int`

### showWrapper

```php
public function showWrapper()
```

Get if panel wrapper should be shown.

**Returns** `bool`

### isCachable

```php
public function isCachable()
```

Get if widget allows caching.

**Returns** `bool`

### isCachedPerUser

```php
public function isCachedPerUser()
```

Get if widget requires caching per user.

**Returns** `bool`

### getCacheExpiry

```php
public function getCacheExpiry()
```

Get cache expiry time.

**Returns** `int`

### getRequiredPermission

```php
public function getRequiredPermission()
```

Get required permission.

**Returns** `string`

### getData

```php
public function getData()
```

Get data method.

A widget should override this method.

**Returns** `array`

### generateOutput

```php
public function generateOutput($data)
```

Generate output.

A widget should override this method.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `array` | `$data` |  |


**Returns** `string`

### sanitizeData

```php
public function sanitizeData($data)
```

**Returns** `mixed`

### render

```php
public function render($forceRefresh = false)
```

Render widget.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `bool` | `$forceRefresh` |  |


**Returns** `string`

### isDraggable

```php
public function isDraggable()
```

**Returns** `bool`