function hal_help

Same name in other branches
  1. 8.9.x core/modules/hal/hal.module \hal_help()

Implements hook_help().

File

core/modules/hal/hal.module, line 13

Code

function hal_help($route_name, RouteMatchInterface $route_match) {
    switch ($route_name) {
        case 'help.page.hal':
            $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.', [
                ':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="http://wikipedia.org/wiki/Link_relation">link relations</a> between them, enabling API consumers to follow links to discover API functionality.') . '</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 the <a href=":hal_do">online documentation for the HAL module</a>.', [
                ':hal_do' => 'https://www.drupal.org/documentation/modules/hal',
            ]) . '</p>';
            return $output;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.