You are here

http_client_manager.module in HTTP Client Manager 8

Same filename and directory in other branches
  1. 8.2 http_client_manager.module

File

http_client_manager.module
View source
<?php

/**
 * @file
 * Contains http_client_manager.module..
 */
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\http_client_manager\HttpServiceApiHandler;

/**
 * Implements hook_help().
 */
function http_client_manager_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {

    // Main module help for the http_client_manager module.
    case 'help.page.http_client_manager':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('Manage HTTP Clients instances and configurations.') . '</p>';
      return $output;
    case 'http_client_manager.preview':
      $code = "<pre><code>\$settings['http_services_api']['your_service_api_id'] = [\n";
      $code .= "  'title' => 'Example API (Development)',\n";
      $code .= "  'base_url' => 'http://dev.example.com/api',\n";
      $code .= "];</code></pre>";
      $build = [
        'help' => [
          '#type' => 'details',
          '#title' => t('Help - Overriding HTTP Services API definitions'),
          '#description' => t('HTTP Services API definitions can be overridden in settings.php. Overridable properties are: @list', [
            '@list' => implode(', ', HttpServiceApiHandler::getOverridableProperties()),
          ]),
          'code' => [
            '#markup' => $code,
          ],
        ],
      ];
      return $build;
    default:
  }
}

Functions

Namesort descending Description
http_client_manager_help Implements hook_help().