function mobile_tools_is_mobile_ctools_access_settings in Mobile Tools 6
Same name and namespace in other branches
- 6.3 plugins/access/is_mobile.inc \mobile_tools_is_mobile_ctools_access_settings()
- 6.2 plugins/access/is_mobile.inc \mobile_tools_is_mobile_ctools_access_settings()
Settings form for the 'by perm' access plugin
@todo Need a way to provide a list of all available contexts to be used by the eval-ed PHP.
1 string reference to 'mobile_tools_is_mobile_ctools_access_settings'
- mobile_tools_is_mobile_ctools_access in plugins/
access/ is_mobile.inc - Implementation of specially named hook_ctools_access().
File
- plugins/
access/ is_mobile.inc, line 31 - Plugin to provide access control based on evaluated PHP.
Code
function mobile_tools_is_mobile_ctools_access_settings(&$form, &$form_state, $conf) {
$perms = array();
$options = mobile_tools_device_groups();
$options['mobile'] = 'Mobile device';
$form['settings']['description'] = array(
'#type' => 'textfield',
'#title' => t('Administrative desc'),
'#default_value' => $conf['description'],
'#description' => t('A description for this test for administrative purposes.'),
);
$form['settings']['mobile_any'] = array(
'#type' => 'checkbox',
'#title' => t('Mobile brower'),
'#default_value' => $conf['mobile_any'],
'#description' => t('Access will be granted if the client browser is any mobile.'),
);
$form['settings']['mobile_list'] = array(
'#type' => 'select',
'#title' => t('User Agent'),
'#default_value' => $conf['mobile_list'],
'#options' => $options,
'#multiple' => TRUE,
'#description' => t('Access will be granted if the client browser matches the specific groups.'),
);
}