You are here

system_settings_service.module in Deploy - Content Staging 6

Same filename and directory in other branches
  1. 5 services/system_settings_service/system_settings_service.module

Service for the management of system settings that used Drupals' system_settings_form() API.

@todo Would be nice to have an export service too.

File

services/system_settings_service/system_settings_service.module
View source
<?php

/**
 * @file
 * Service for the management of system settings that used Drupals'
 * system_settings_form() API.
 *
 * @todo
 *   Would be nice to have an export service too.
 */

/**
 * Implementation of hook_help().
 */
function system_settings_service_help($path, $arg) {
  switch ($path) {
    case 'admin/help#services_system_settings':
      return t('<p>Provides system settings services. Requires services.module.</p>');
    case 'admin/modules#description':
      return t('Provides system settings services. Requires services.module.');
  }
}

/**
 * Implementation of hook_perm().
 */
function system_settings_service_perm() {
  return array(
    'import system settings',
    'export system settings',
  );
}

/**
 * Implementation of hook_service().
 */
function system_settings_service_service() {
  $services = array();

  // system_settings.import
  $services[] = array(
    '#method' => 'system_settings.import',
    '#access callback' => 'system_settings_service_import_access',
    '#callback' => 'system_settings_service_import',
    '#file' => array(
      'file' => 'inc',
      'module' => 'system_settings_service',
    ),
    '#args' => array(
      array(
        '#name' => 'settings',
        '#type' => 'struct',
        '#description' => t('Array of system settings form values.'),
      ),
    ),
    '#return' => 'string',
    '#help' => t('Import system settings'),
  );
  return $services;
}

Functions

Namesort descending Description
system_settings_service_help Implementation of hook_help().
system_settings_service_perm Implementation of hook_perm().
system_settings_service_service Implementation of hook_service().