You are here

function menu_token_settings_form in Menu Token 7

Display settings form for Menu Token.

See also

menu_token_menu()

1 string reference to 'menu_token_settings_form'
menu_token_menu in ./menu_token.module
Implements hook_menu().

File

./menu_token.admin.inc, line 12
Admin settings for Menu Token.

Code

function menu_token_settings_form() {
  $form = array();
  $options = array();
  foreach (entity_get_info() as $entity => $info) {
    $options[$entity] = $info['label'];
  }
  $form['menu_token_entities'] = array(
    '#title' => t('Available entities'),
    '#description' => t("Limit which entities are available in Menu Token's context settings select boxes."),
    '#type' => 'checkboxes',
    '#options' => $options,
    '#default_value' => variable_get('menu_token_entities', array(
      'node',
      'user',
    )),
  );
  $form['#submit'][] = 'menu_token_settings_form_submit';
  return system_settings_form($form);
}