# WHMCS\Module\Addon\Setting

`Class` · extends `AbstractModel`

Class Setting

## Traits

- `EncryptedModelTrait`


## Constants

| Name | Description |
|  --- | --- |
| `MODULE_LICENSING` | TODO: Move constants to related licensing add-on classes, when possible, in current WHMCS state       module add-ons do not have classes, only php files available |
| `SETTING_OPTIMISE_TABLE` |  |


## Properties

| Type | Name | Description |
|  --- | --- | --- |
| `` | `$timestamps` |  |


## Methods

### getSettingValueForModule

```php
public static function getSettingValueForModule(string $module, string $setting): ?string
```

Retrieve value for addon module's setting

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `string` | `$module` |  |
| `string` | `$setting` |  |


**Returns** `string\|null` — - string if entry is found, null if setting is not defined.

### scopeModule

```php
public function scopeModule($query, $module)
```

### setModuleValue

```php
public static function setModuleValue(string $module, string $setting, $value): self
```

### deleteAllAccessEntries

```php
public static function deleteAllAccessEntries(): void
```

### deleteModule

```php
public static function deleteModule(string $module): void
```

### getForAddon

```php
public static function getForAddon(string $module): Collection
```

### setValueAttribute

```php
public function setValueAttribute($value): void
```

### getValueAttribute

```php
public function getValueAttribute(): ?string
```

### isEncryptedSetting

```php
public function isEncryptedSetting(): bool
```

### encryptAndSaveValue

```php
public function encryptAndSaveValue(): bool
```

### getHashKey

```php
public function getHashKey(): string
```