menu_token.admin.inc 690 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * @file
  4. * Admin settings for Menu Token.
  5. */
  6. /**
  7. * Display settings form for Menu Token.
  8. *
  9. * @see menu_token_menu()
  10. */
  11. function menu_token_settings_form() {
  12. $form = array();
  13. $options = array();
  14. foreach (entity_get_info() as $entity => $info) {
  15. $options[$entity] = $info['label'];
  16. }
  17. $form['menu_token_entities'] = array(
  18. '#title' => t('Available entities'),
  19. '#description' => t("Limit which entities are available in Menu Token's context settings select boxes."),
  20. '#type' => 'checkboxes',
  21. '#options' => $options,
  22. '#default_value' => variable_get('menu_token_entities', array('node', 'user')),
  23. );
  24. return system_settings_form($form);
  25. }