diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2016-02-16 19:58:48 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2016-02-16 19:58:48 +0300 |
commit | a84c20be4729ea15550364076ac7645ff5203220 (patch) | |
tree | d1d42cd3ebd8f68d9f58ff3f2840dfc40f50b866 /core/Settings | |
parent | f6a038b788dbcabfa97ed32d7dc66e58d27bb5c3 (diff) |
add possibility to set a system setting is writable/not writable
Diffstat (limited to 'core/Settings')
-rw-r--r-- | core/Settings/SystemSetting.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/Settings/SystemSetting.php b/core/Settings/SystemSetting.php index fb0a4d7a2d..68e780a3e8 100644 --- a/core/Settings/SystemSetting.php +++ b/core/Settings/SystemSetting.php @@ -67,6 +67,16 @@ class SystemSetting extends Setting } /** + * Set whether setting is writable or not. For example to hide setting from the UI set it to false. + * + * @param bool $isWritable + */ + public function setIsWritableByCurrentUser($isWritable) + { + $this->writableByCurrentUser = (bool) $isWritable; + } + + /** * Returns `true` if this setting can be displayed for the current user, `false` if otherwise. * * @return bool |