You are here

function openlayers_admin_settings in Openlayers 6

Menu callback; displays the openlayers module settings page.

See also

system_settings_form()

1 string reference to 'openlayers_admin_settings'
openlayers_menu in ./openlayers.module
Implementation of hook_menu().

File

includes/openlayers.admin.inc, line 15
This file holds the functions for the openlayers Admin settings.

Code

function openlayers_admin_settings() {

  // Initialize
  openlayers_initialize();

  // Let user know about advanced help
  $help = array();
  if (module_exists('advanced_help')) {
    $help['openlayers_advanced_help'] = array(
      '#type' => 'item',
      '#title' => t('OpenLayers Help') . theme('advanced_help_topic', 'openlayers', 'openlayers-about'),
      '#value' => t('Access the advanced help here: !link or click the small help icon.', array(
        '!link' => l(t('Advanced Help'), 'admin/advanced_help/openlayers'),
      )),
    );
  }
  else {
    drupal_set_message(t('This module has extensive help text available with the <a href="http://drupal.org/project/advanced_help">Advanced Help module</a>'));
  }

  // Get settings elements
  $settings = _openlayers_settings_form();
  $form = array_merge($help, $settings);

  // Make a system setting form and return
  return system_settings_form($form);
}