diff options
author | Simon Rettberg | 2016-07-04 15:22:05 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-07-04 15:22:05 +0200 |
commit | 75746e15880c72487864ed62b860052eedc224b6 (patch) | |
tree | d215f39a9303e35bf9d501af36abaa27352d33f8 /modules-available/baseconfig_bwlp | |
parent | delete update.inc.php: Not used anymore (diff) | |
download | slx-admin-75746e15880c72487864ed62b860052eedc224b6.tar.gz slx-admin-75746e15880c72487864ed62b860052eedc224b6.tar.xz slx-admin-75746e15880c72487864ed62b860052eedc224b6.zip |
[translation] Improve module list; move baseconfig hook to baseconfig_bwlp
Diffstat (limited to 'modules-available/baseconfig_bwlp')
-rw-r--r-- | modules-available/baseconfig_bwlp/config.json | 3 | ||||
-rw-r--r-- | modules-available/baseconfig_bwlp/hooks/translation.inc.php | 39 |
2 files changed, 42 insertions, 0 deletions
diff --git a/modules-available/baseconfig_bwlp/config.json b/modules-available/baseconfig_bwlp/config.json new file mode 100644 index 00000000..af67a188 --- /dev/null +++ b/modules-available/baseconfig_bwlp/config.json @@ -0,0 +1,3 @@ +{ + "dependencies": ["baseconfig"] +} diff --git a/modules-available/baseconfig_bwlp/hooks/translation.inc.php b/modules-available/baseconfig_bwlp/hooks/translation.inc.php new file mode 100644 index 00000000..7588fe38 --- /dev/null +++ b/modules-available/baseconfig_bwlp/hooks/translation.inc.php @@ -0,0 +1,39 @@ +<?php + +$HANDLER = array(); + +/** + * List of valid subsections + */ +$HANDLER['subsections'] = array( + 'config-variable-categories', 'config-variables' +); + +/* + * Handlers for the subsections that will return an array of expected tags. + * This is optional, if you don't want to define expected tags, don't create a function. + */ + +/** + * Configuration categories + */ +$HANDLER['grep_config-variable-categories'] = function($module) { + $module->activate(); + $want = BaseConfigUtil::getCategories(); + foreach ($want as &$entry) { + $entry = true; + } + return $want; +}; + +/** + * Configuration variables + */ +$HANDLER['grep_config-variables'] = function($module) { + $module->activate(); + $want = BaseConfigUtil::getVariables(); + foreach ($want as &$entry) { + $entry = true; + } + return $want; +}; |