diff options
author | Sergey Linnik <sergey.linnik@onlyoffice.com> | 2019-06-14 13:59:43 +0300 |
---|---|---|
committer | Sergey Linnik <sergey.linnik@onlyoffice.com> | 2019-06-14 13:59:43 +0300 |
commit | 9c826ce9ceda72fddff29f4e4920dfe48adb7c57 (patch) | |
tree | f40e38f7eadd41f5a1f1778ed27cd3ea4a04baa9 /lib/appconfig.php | |
parent | d264f75701f18cbf46c8a09b6be8d7ee4db68464 (diff) | |
parent | 9061f4d03099ea1d923b740839e2a8fb187894ce (diff) |
Merge branch 'feature/settings' into develop
# Conflicts:
# controller/settingscontroller.php
Diffstat (limited to 'lib/appconfig.php')
-rw-r--r-- | lib/appconfig.php | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/lib/appconfig.php b/lib/appconfig.php index 6df10cb..a5952bb 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -111,6 +111,41 @@ class AppConfig { private $_sameTab = "sameTab"; /** + * The config key for the chat display setting + * + * @var string + */ + private $_customizationChat = "customizationChat"; + + /** + * The config key for display the header more compact setting + * + * @var string + */ + private $_customizationCompactHeader = "customizationCompactHeader"; + + /** + * The config key for the feedback display setting + * + * @var string + */ + private $_customizationFeedback = "customizationFeedback"; + + /** + * The config key for the help display setting + * + * @var string + */ + private $_customizationHelp = "customizationHelp"; + + /** + * The config key for the no tabs setting + * + * @var string + */ + private $_customizationToolbarNoTabs = "customizationToolbarNoTabs"; + + /** * The config key for the setting limit groups * * @var string @@ -432,6 +467,106 @@ class AppConfig { } /** + * Save chat display setting + * + * @param bool $value - display chat + */ + public function SetCustomizationChat($value) { + $this->logger->info("Set chat display: " . json_encode($value), array("app" => $this->appName)); + + $this->config->setAppValue($this->appName, $this->_customizationChat, json_encode($value)); + } + + /** + * Get chat display setting + * + * @return bool + */ + public function GetCustomizationChat() { + return $this->config->getAppValue($this->appName, $this->_customizationChat, "true") === "true"; + } + + /** + * Save compact header setting + * + * @param bool $value - display compact header + */ + public function SetCustomizationCompactHeader($value) { + $this->logger->info("Set compact header display: " . json_encode($value), array("app" => $this->appName)); + + $this->config->setAppValue($this->appName, $this->_customizationCompactHeader, json_encode($value)); + } + + /** + * Get compact header setting + * + * @return bool + */ + public function GetCustomizationCompactHeader() { + return $this->config->getAppValue($this->appName, $this->_customizationCompactHeader, "true") === "true"; + } + + /** + * Save feedback display setting + * + * @param bool $value - display feedback + */ + public function SetCustomizationFeedback($value) { + $this->logger->info("Set feedback display: " . json_encode($value), array("app" => $this->appName)); + + $this->config->setAppValue($this->appName, $this->_customizationFeedback, json_encode($value)); + } + + /** + * Get feedback display setting + * + * @return bool + */ + public function GetCustomizationFeedback() { + return $this->config->getAppValue($this->appName, $this->_customizationFeedback, "true") === "true"; + } + + /** + * Save help display setting + * + * @param bool $value - display help + */ + public function SetCustomizationHelp($value) { + $this->logger->info("Set help display: " . json_encode($value), array("app" => $this->appName)); + + $this->config->setAppValue($this->appName, $this->_customizationHelp, json_encode($value)); + } + + /** + * Get help display setting + * + * @return bool + */ + public function GetCustomizationHelp() { + return $this->config->getAppValue($this->appName, $this->_customizationHelp, "true") === "true"; + } + + /** + * Save without tabs setting + * + * @param bool $value - without tabs + */ + public function SetCustomizationToolbarNoTabs($value) { + $this->logger->info("Set without tabs: " . json_encode($value), array("app" => $this->appName)); + + $this->config->setAppValue($this->appName, $this->_customizationToolbarNoTabs, json_encode($value)); + } + + /** + * Get without tabs setting + * + * @return bool + */ + public function GetCustomizationToolbarNoTabs() { + return $this->config->getAppValue($this->appName, $this->_customizationToolbarNoTabs, "true") === "true"; + } + + /** * Save the list of groups * * @param array $groups - the list of groups |