function menu_node_access_parent_access_settings in Panels Extras 7
Same name and namespace in other branches
- 6 menu_node_access/plugins/access/parent.inc \menu_node_access_parent_access_settings()
Settings form for the 'by menus' access plugin
1 string reference to 'menu_node_access_parent_access_settings'
- parent.inc in menu_node_access/
plugins/ access/ parent.inc - Plugin to provide access control based upon if node being viewed belongs to a menu(s).
File
- menu_node_access/
plugins/ access/ parent.inc, line 26 - Plugin to provide access control based upon if node being viewed belongs to a menu(s).
Code
function menu_node_access_parent_access_settings($form, &$form_state, $conf) {
$menus = menu_get_menus();
foreach ($menus as $menu => $info) {
$options[$menu] = check_plain($info);
}
$form['settings']['parent_mlid'] = array(
'#type' => 'select',
'#title' => t('Fixed parent item'),
'#default_value' => $conf['menu_name'] . ':' . $conf['parent_mlid'],
'#options' => menu_parent_options($menus, array(
'mlid' => 0,
)),
'#description' => t('The tree of links will only contain children of the selected menu item.'),
);
return $form;
}