You are here

function cdn_help in CDN 8.3

Implements hook_help().

File

./cdn.module, line 14
Provides integration with CDNs for files.

Code

function cdn_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.cdn':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('The CDN module can serve files (CSS, JavaScript, images, fonts, videos …) from a <abbr title="Content Delivery Network">CDN</abbr> instead of your web server(s). For more information, see the <a href=":online">online documentation for the CDN module</a>.', [
        ':online' => 'https://www.drupal.org/docs/8/managing-site-performance-and-scalability/content-delivery-network-cdn',
      ]) . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('General') . '</dt>';
      $output .= '<dd>' . t('A content delivery network is a collection of web servers distributed across multiple locations around the world to deliver content more efficiently to users. The server selected for delivering content to a specific user is typically based on a measure of network proximity. For more information, see <a href="http://wimleers.com/article/key-properties-of-a-cdn"><q>Key Properties of a CDN</q>.</a>') . '</dd>';
      $output .= '<dt>' . t('Improving performance') . '</dt>';
      $output .= '<dd>' . t('Because a CDN automatically serves files from the location that is closest to the end user, files can be downloaded by end users faster. It can be faster in two ways: downloads start faster (lower latency) and downloads complete faster (higher bandwidth).') . '</dd>';
      $output .= '<dt>' . t('Reducing server load & costs') . '</dt>';
      $output .= '<dd>' . t('By letting a CDN serve files instead of your webserver(s), it is possible to significantly reduce the load on your server and its costs. Note that it may just as well end up costing more — it depends on pricing of the CDN and your server(s).') . '</dd>';
      $output .= '</dl>';
      return $output;
  }
}