PHP Trait skeeks\cms\traits\HasComponentDbSettingsTrait

Mostra file Open project: skeeks-cms/cms

Public Properties

Property Type Description
$autoSettingsIdPrefix the prefix to the automatically generated widget IDs.
$counterSettings a counter used to generate [[id]] for widgets.
$namespace

Public Methods

Method Description
fetchDefaultSettings ( ) : array Настройки по умолчанию
fetchDefaultSettingsBySiteCode ( (string) $site_code ) : array Настройки для сайта
fetchDefaultSettingsByUserId ( $user_id ) : array Настройки для пользователя
getCacheKey ( )
getCallableData ( ) : array
getCallableEditUrl ( ) : UrlHelper
getCallableId ( ) : string
getEditUrl ( ) : UrlHelper
getSettings ( ) : array
getSettingsId ( boolean $autoGenerate = true ) : string Returns the ID of the widget.
initSettings ( ) Загрузка настроек по умолчанию
invalidateCache ( )
loadDefaultSettings ( )
loadSettingsBySite ( CmsSite $site )
loadSettingsByUser ( $user )
saveDefaultSettings ( ) : boolean
saveDefaultSettingsBySiteCode ( $site_code ) : boolean
saveDefaultSettingsByUserId ( $user_id ) : boolean
setSettingsId ( string $value ) Sets the ID of the widget.

Method Details

fetchDefaultSettings() public method

Настройки по умолчанию
public fetchDefaultSettings ( ) : array
return array

fetchDefaultSettingsBySiteCode() public method

Настройки для сайта
public fetchDefaultSettingsBySiteCode ( (string) $site_code ) : array
$site_code (string)
return array

fetchDefaultSettingsByUserId() public method

Настройки для пользователя
public fetchDefaultSettingsByUserId ( $user_id ) : array
return array

getCacheKey() public method

public getCacheKey ( )

getCallableData() public method

public getCallableData ( ) : array
return array

getCallableEditUrl() public method

public getCallableEditUrl ( ) : UrlHelper
return skeeks\cms\helpers\UrlHelper

getCallableId() public method

public getCallableId ( ) : string
return string

getEditUrl() public method

public getEditUrl ( ) : UrlHelper
return skeeks\cms\helpers\UrlHelper

getSettings() public method

public getSettings ( ) : array
return array

getSettingsId() public method

Returns the ID of the widget.
public getSettingsId ( boolean $autoGenerate = true ) : string
$autoGenerate boolean whether to generate an ID if it is not set previously
return string ID of the widget.

initSettings() public method

Загрузка настроек по умолчанию
public initSettings ( )

invalidateCache() public method

public invalidateCache ( )

loadDefaultSettings() public method

public loadDefaultSettings ( )

loadSettingsBySite() public method

public loadSettingsBySite ( CmsSite $site )
$site skeeks\cms\models\CmsSite

loadSettingsByUser() public method

public loadSettingsByUser ( $user )

saveDefaultSettings() public method

public saveDefaultSettings ( ) : boolean
return boolean

saveDefaultSettingsBySiteCode() public method

public saveDefaultSettingsBySiteCode ( $site_code ) : boolean
return boolean

saveDefaultSettingsByUserId() public method

public saveDefaultSettingsByUserId ( $user_id ) : boolean
return boolean

setSettingsId() public method

Sets the ID of the widget.
public setSettingsId ( string $value )
$value string id of the widget.

Property Details

$autoSettingsIdPrefix public_oe static_oe property

the prefix to the automatically generated widget IDs.
See also: getId()
public static $autoSettingsIdPrefix

$counterSettings public_oe static_oe property

a counter used to generate [[id]] for widgets.
public static $counterSettings

$namespace public_oe property

public $namespace