You are here

function spaces_basic_form in Spaces 5.2

Same name and namespace in other branches
  1. 6 spaces_admin.inc \spaces_basic_form()
  2. 6.2 spaces_admin.inc \spaces_basic_form()
1 string reference to 'spaces_basic_form'
spaces_active_space_menu in ./spaces.module
A mild abstraction of hook_menu() items that can be used by implementing modules to embed/graft relevant spaces items into the menu tree. Should only be used when the $may_cache argument of hook_menu() is false.

File

./spaces_admin.inc, line 469

Code

function spaces_basic_form($space) {
  $form = array();
  $form['space'] = array(
    '#type' => 'value',
    '#value' => $space,
  );
  $types = spaces_types();
  if (isset($types[$space->type]['custom prefixes']) && $types[$space->type]['custom prefixes'] != FALSE) {

    // Add context prefix form
    $form['context_prefix'] = context_prefix_form('spaces', $space->type . ':' . $space->sid, $space->prefix);
  }

  // Add preset form
  $form['preset'] = spaces_form_presets($space);
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
  );
  $form['#theme'] = 'spaces_form';
  return $form;
}