hal.module 1.24 KB
Newer Older
1 2 3 4
<?php

/**
 * @file
5
 * Adds support for serializing entities to Hypertext Application Language.
6
 */
7

8
use Drupal\Core\Routing\RouteMatchInterface;
9

10 11 12
/**
 * Implements hook_help().
 */
13
function hal_help($route_name, RouteMatchInterface $route_match) {
14 15
  switch ($route_name) {
    case 'help.page.hal':
16 17 18 19 20 21 22 23
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('<a href="!hal_spec">Hypertext Application Language (HAL)</a> is a format that supports the linking required for hypermedia APIs.', array('!hal_spec' => 'http://stateless.co/hal_specification.html')) . '</p>';
      $output .= '<p>' . t('Hypermedia APIs are a style of Web API that uses URIs to identify resources and the <a href="!link_rel">link relations</a> between them, enabling API consumers to follow links to discover API functionality.', array('!link_rel' => 'http://en.wikipedia.org/wiki/Link_relation')) . '</p>';
      $output .= '<p>' . t('This module adds support for serializing entities (such as content items, taxonomy terms, etc.) to the JSON version of HAL. For more information, see <a href="!hal_do">the online documentation for the HAL module</a>.', array('!hal_do' => 'https://drupal.org/documentation/modules/hal')) . '</p>';
      return $output;
  }
}