Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176
This commit is contained in:
commit
9921556621
13277 changed files with 1459781 additions and 0 deletions
23
core/modules/hal/hal.module
Normal file
23
core/modules/hal/hal.module
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Adds support for serializing entities to Hypertext Application Language.
|
||||
*/
|
||||
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
|
||||
/**
|
||||
* Implements hook_help().
|
||||
*/
|
||||
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.', 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://www.drupal.org/documentation/modules/hal')) . '</p>';
|
||||
return $output;
|
||||
}
|
||||
}
|
Reference in a new issue