/** * Form to add a visibility rule. */ function panels_edit_add_access_test_form($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; }
/** * Form to add a visibility rule. */ function panels_edit_add_access_test_form($form, &$form_state) { ctools_form_include($form_state, 'plugins', 'panels'); form_load_include($form_state, 'php', 'panels', '/plugins/display_renderers/panels_renderer_editor.class'); $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('#type' => 'radios', '#options' => $options); $form['next'] = array('#type' => 'submit', '#value' => t('Next')); return $form; }