Class Setting

class Setting extends AbstractModel

Traits

EncryptedModelTrait

Constants

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 summary

Type Property Description
protected $table
protected $modelName
protected $fillable
protected $encryptedSettings
$timestamps
int $id
string $module
string $setting
string $value

Methods summary

Return Type Method Name Description
static string|null getSettingValueForModule(string $module, string $setting) Retrieve value for addon module's setting
scopeModule($query, $module) -
static  setModuleValue($module, $setting, $value) -
static  deleteAllAccessEntries() -
static  deleteModule($module) -
static  getForAddon(string $module) -
setValueAttribute($value) -
getValueAttribute() -
bool isEncryptedSetting() -
encryptAndSaveValue() -
string getHashKey() -

Details

static string|null getSettingValueForModule (string $module, string $setting)

Retrieve value for addon module's setting

Parameters

string $module
string $setting

Return Value

string|null
  • string if entry is found, null if setting is not defined.

scopeModule ($query, $module)

Parameters

$query
$module

static setModuleValue ($module, $setting, $value)

Parameters

$module
$setting
$value

static deleteAllAccessEntries ()

static deleteModule ($module)

Parameters

$module

static getForAddon (string $module)

Parameters

string $module

setValueAttribute ($value)

Parameters

$value

getValueAttribute ()

bool isEncryptedSetting ()

Return Value

bool

encryptAndSaveValue ()

string getHashKey ()

Return Value

string