app/Module/AbstractModule.php
final public function getPreference(string $setting_name, string $default = ''): string
    {
        return DB::table('module_setting')
            ->where('module_name', '=', $this->name())
            ->where('setting_name', '=', $setting_name)
            ->value('setting_value') ?? $default;
    }
final public function getPreference(string $setting_name, string $default = ''): string
    {
        return DB::table('module_setting')
            ->where('module_name', '=', $this->name())
            ->where('setting_name', '=', $setting_name)
            ->value('setting_value') ?? $default;
    }
final public function getPreference ( string $ setting_name , string $ default = '' ) : string { return DB :: table ( 'module_setting' ) -> where ( 'module_name' , '=' , $ this -> name ( ) ) -> where ( 'setting_name' , '=' , $ setting_name ) -> value ( 'setting_value' ) ?? $ default ; }
Get a module setting. Return a default if the setting is not set.

@param string $setting_name
@param string $default

@return string
Get a module setting . Return a default if the setting is not set .