function panels_edit_add_access_test_form in Panels 6.3
Same name and namespace in other branches
- 7.3 plugins/display_renderers/panels_renderer_editor.class.php \panels_edit_add_access_test_form()
Form to add a visibility rule.
1 string reference to 'panels_edit_add_access_test_form'
- panels_renderer_editor::ajax_access_add_test in plugins/
display_renderers/ panels_renderer_editor.class.php - AJAX entry point for to add a visibility rule.
File
- plugins/
display_renderers/ panels_renderer_editor.class.php, line 1800 - Class file to control the main Panels editor.
Code
function panels_edit_add_access_test_form(&$form_state) {
$display =& $form_state['display'];
$pane =& $form_state['pane'];
$plugins = ctools_get_relevant_access_plugins($display->context);
$options = array();
foreach ($plugins as $id => $plugin) {
$options[$id] = $plugin['title'];
}
asort($options);
$form['type'] = array(
// This ensures that the form item is added to the URL.
'#type' => 'radios',
'#options' => $options,
);
$form['next'] = array(
'#type' => 'submit',
'#value' => t('Next'),
);
return $form;
}