public function sweaver_plugin_kb::sweaver_menu_callback in Sweaver 7
Same name and namespace in other branches
- 6 plugins/sweaver_plugin_kb/sweaver_plugin_kb.inc \sweaver_plugin_kb::sweaver_menu_callback()
Keyboard bindings settings form.
Overrides sweaver_plugin::sweaver_menu_callback
File
- plugins/
sweaver_plugin_kb/ sweaver_plugin_kb.inc, line 68 - Key bindings plugin.
Class
- sweaver_plugin_kb
- @file Key bindings plugin.
Code
public function sweaver_menu_callback() {
$form = array();
$bindings = $this
->sweaver_kb_bindings();
$binding_options = $this
->sweaver_kb_binding_options();
$form['info'] = array(
'#markup' => t('Select keys for every event possible. Note, there is no validation when saving this form, so make sure every event has a unique key.'),
);
foreach ($bindings as $key => $value) {
$form['sweaver_plugin_kb_' . $key] = array(
'#type' => 'select',
'#options' => $binding_options,
'#title' => $value['title'],
'#default_value' => variable_get('sweaver_plugin_kb_' . $key, $value['default']),
);
}
return system_settings_form($form);
}