Projet

Général

Profil

Paste
Télécharger (690 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / menu_token / menu_token.admin.inc @ 87dbc3bf

1
<?php
2
/**
3
 * @file
4
 * Admin settings for Menu Token.
5
 */
6

    
7
/**
8
 * Display settings form for Menu Token.
9
 *
10
 * @see menu_token_menu()
11
 */
12
function menu_token_settings_form() {
13
  $form = array();
14
  $options = array();
15

    
16
  foreach (entity_get_info() as $entity => $info) {
17
    $options[$entity] = $info['label'];
18
  }
19

    
20
  $form['menu_token_entities'] = array(
21
    '#title' => t('Available entities'),
22
    '#description' => t("Limit which entities are available in Menu Token's context settings select boxes."),
23
    '#type' => 'checkboxes',
24
    '#options' => $options,
25
    '#default_value' => variable_get('menu_token_entities', array('node', 'user')),
26
  );
27

    
28
  return system_settings_form($form);
29
}