You are here

function vppn_config_form in View Permission Per Node 7

Form builder / page callback for the admin config form.

1 string reference to 'vppn_config_form'
vppn_menu in ./vppn.module
Implements hook_menu().

File

./vppn.admin.inc, line 11
Administration functionality for VPPN.

Code

function vppn_config_form($form) {

  // Add a description.
  $form['description'] = array(
    '#type' => 'item',
    '#markup' => t('Select content types that should have the view permission on each node.'),
  );

  // Each content type.
  foreach (node_type_get_types() as $type => $info) {

    // Add a setting for each type.
    $form['vppn_node_' . $type] = array(
      '#type' => 'checkbox',
      '#title' => $info->name,
      '#default_value' => variable_get('vppn_node_' . $type, 0),
    );
  }

  // Return the renderable system settings form.
  return system_settings_form($form);
}