Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2016-03-07 01:20:09 +0300
committerThomas Steur <tsteur@users.noreply.github.com>2016-03-07 01:20:09 +0300
commit1934bb1e3a4b558e15d9b03fcab0e0613217d490 (patch)
tree05cee1114ad95d8ac324c83cb624884a74a5a123 /core
parent027427f74f80c788ddf7f131e2f9310244b5d4ca (diff)
parent4c3776de2d8d67b2a9a798106fad20c91f65d439 (diff)
Merge pull request #9794 from piwik/change_writable_setting
Add possibility to set a system setting is writable/not writable
Diffstat (limited to 'core')
-rw-r--r--core/Settings/SystemSetting.php10
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