You are here

system_settings_service.module in Deploy - Content Staging 5

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

File

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

/**
 * Implementation of hook_help().
 */
function system_settings_service_help($section) {
  switch ($section) {
    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_service()
 */
function system_settings_service_service() {
  return array(
    // content_copy.import
    array(
      '#method' => 'system_settings.import',
      '#callback' => 'system_settings_service_import',
      '#args' => array(
        array(
          '#name' => 'settings',
          '#type' => 'struct',
          '#description' => t('Array of system settings form values.'),
        ),
      ),
      '#return' => 'string',
      '#help' => t('Import system settings'),
    ),
  );
}
function system_settings_service_import($form_values) {
  $form_id = $form_values['form_id'];
  system_settings_form_submit($form_id, $form_values);
  watchdog("Services", "System Settings Import Service run for {$form_id}.");
  return TRUE;
}

Functions

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