Class humhub\components\SettingsManager

Inheritancehumhub\components\SettingsManager » humhub\libs\BaseSettingsManager » yii\base\Component
Available since version1.1

SettingsManager application component

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$modelClass string Settings model class name humhub\libs\BaseSettingsManager
$moduleId string Module id this settings manager belongs to. humhub\libs\BaseSettingsManager

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$_loaded array|null Of loaded settings humhub\libs\BaseSettingsManager
$contentContainers humhub\modules\content\components\ContentContainerSettingsManager[] Already loaded content container settings managers humhub\components\SettingsManager

Public Methods

Hide inherited methods

MethodDescriptionDefined By
contentContainer() Returns content container humhub\components\SettingsManager
delete() Deletes setting humhub\libs\BaseSettingsManager
deleteAll() Deletes all stored settings humhub\libs\BaseSettingsManager
flushContentContainer() Clears runtime cached content container settings humhub\components\SettingsManager
get() Returns value of setting humhub\components\SettingsManager
getSerialized() Receives a value which was saved as serialized value. humhub\libs\BaseSettingsManager
getUncached() Returns the value of setting without any caching humhub\libs\BaseSettingsManager
init() humhub\libs\BaseSettingsManager
isDatabaseInstalled() Checks if settings table exists or application is not installed yet humhub\libs\BaseSettingsManager
isFixed() Indicates this setting is fixed in configuration file and cannot be changed at runtime. humhub\components\SettingsManager
reload() Reloads all values from database humhub\libs\BaseSettingsManager
set() Sets a settings value humhub\libs\BaseSettingsManager
setSerialized() Can be used to set object/arrays as a serialized values. humhub\libs\BaseSettingsManager
space() Returns ContentContainerSettingsManager for the given $space or current controller space humhub\components\SettingsManager
user() Returns ContentContainerSettingsManager for the given $user or current logged in user humhub\components\SettingsManager

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
createRecord() Returns settings active record instance humhub\libs\BaseSettingsManager
find() Returns ActiveQuery to find settings humhub\libs\BaseSettingsManager
getCacheKey() Returns settings managers cache key humhub\libs\BaseSettingsManager
invalidateCache() Invalidates settings cache humhub\libs\BaseSettingsManager
loadValues() Loads values from database humhub\libs\BaseSettingsManager

Property Details

$contentContainers protected property

Already loaded content container settings managers

Method Details

contentContainer() public method

Returns content container

public humhub\modules\content\components\ContentContainerSettingsManager contentContainer ( humhub\modules\content\components\ContentContainerActiveRecord $container )
$container humhub\modules\content\components\ContentContainerActiveRecord
flushContentContainer() public method

Clears runtime cached content container settings

public void flushContentContainer ( humhub\modules\content\components\ContentContainerActiveRecord $container null )
$container humhub\modules\content\components\ContentContainerActiveRecord|null

If null all content containers will be flushed

get() public method

Returns value of setting

public string|null get ( $name, $default null )
$name string

The name of setting

$default
return string|null

The setting value or null when not exists

isFixed() public method

Indicates this setting is fixed in configuration file and cannot be changed at runtime.

public boolean isFixed ( $name )
$name string
space() public method

Returns ContentContainerSettingsManager for the given $space or current controller space

public humhub\modules\content\components\ContentContainerSettingsManager space ( $space null )
$space
user() public method

Returns ContentContainerSettingsManager for the given $user or current logged in user

public humhub\modules\content\components\ContentContainerSettingsManager user ( $user null )
$user