function og_context_plugin_access_og_perm::options_form in Organic groups 7
Same name and namespace in other branches
- 7.2 og_context/includes/views/handlers/og_context_plugin_access_og_perm.inc \og_context_plugin_access_og_perm::options_form()
Provide the default form for setting options.
Overrides views_plugin_access::options_form
File
- og_context/
includes/ views/ og_context_plugin_access_og_perm.inc, line 50 - Contains views access plugin for OG permissions
Class
- og_context_plugin_access_og_perm
- Allow views to allow access to only users with a specified permission in the current group.
Code
function options_form(&$form, &$form_state) {
$perms = array();
// Get list of permissions
$module_info = system_get_info('module');
foreach (og_get_permissions() as $perm => $info) {
$module_name = $module_info[$info['module']]['name'];
$perms[$module_name][$perm] = strip_tags($info['title']);
}
$form['perm'] = array(
'#type' => 'select',
'#options' => $perms,
'#title' => t('OG permission'),
'#default_value' => $this->options['perm'],
'#description' => t('Only users with the selected permission flag in a group retrieved from context will be able to access this display.'),
);
}