You are here

function avatar_selection_settings_page in Avatar Selection 6

Same name and namespace in other branches
  1. 5.2 avatar_selection.module \avatar_selection_settings_page()
  2. 5 avatar_selection.module \avatar_selection_settings_page()
  3. 7 avatar_selection.admin.inc \avatar_selection_settings_page()

Select which form will be shown to the user, according to the permissions.

Parameters

$op: Default NULL; the action the user wants to do after the function checks & the permission.

Return value

Return the structure of the form.

1 string reference to 'avatar_selection_settings_page'
avatar_selection_menu in ./avatar_selection.module
Implementation of hook_menu().

File

./avatar_selection.admin.inc, line 73
Administrative page callbacks for the avatar_selection module.

Code

function avatar_selection_settings_page($op = NULL) {
  switch ($op) {
    case 'edit':
      $output = drupal_get_form('avatar_selection_config_form');
      break;
    case 'upload':
      $output = drupal_get_form('avatar_selection_upload_form');
      break;
    case 'list':
      $output = drupal_get_form('avatar_selection_edit_form');
      break;
    default:
      $form[] = array(
        '#type' => 'fieldset',
        '#title' => t('Add another'),
      );
      $output = drupal_get_form('avatar_selection_config_form');
      break;
  }
  return $output;
}