diff options
author | Simon Rettberg | 2016-08-29 17:13:19 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-08-29 17:13:19 +0200 |
commit | e2c1c6265b43d64442473225b0b01f829f7dec67 (patch) | |
tree | d4d55e9aa0ece5b91c97d5d7cff47be2ea593183 /modules-available/baseconfig_bwidm/hooks/translation.inc.php | |
parent | [property] Make generic getter and setter public; seems best option for modul... (diff) | |
download | slx-admin-e2c1c6265b43d64442473225b0b01f829f7dec67.tar.gz slx-admin-e2c1c6265b43d64442473225b0b01f829f7dec67.tar.xz slx-admin-e2c1c6265b43d64442473225b0b01f829f7dec67.zip |
[baseconfig_bwidm] New module: baseconfig hook for bwidm configuration
Diffstat (limited to 'modules-available/baseconfig_bwidm/hooks/translation.inc.php')
-rw-r--r-- | modules-available/baseconfig_bwidm/hooks/translation.inc.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/modules-available/baseconfig_bwidm/hooks/translation.inc.php b/modules-available/baseconfig_bwidm/hooks/translation.inc.php new file mode 100644 index 00000000..00898075 --- /dev/null +++ b/modules-available/baseconfig_bwidm/hooks/translation.inc.php @@ -0,0 +1,41 @@ +<?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) { + if (!$module->activate()) + return array(); + $want = BaseConfigUtil::getCategories($module); + foreach ($want as &$entry) { + $entry = true; + } + return $want; +}; + +/** + * Configuration variables + */ +$HANDLER['grep_config-variables'] = function($module) { + if (!$module->activate()) + return array(); + $want = BaseConfigUtil::getVariables($module); + foreach ($want as &$entry) { + $entry = true; + } + return $want; +}; |