You are here

restui.module in REST UI 8

Hook implementations for REST UI module.

File

restui.module
View source
<?php

/**
 * @file
 * Hook implementations for REST UI module.
 */
use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Implements hook_help().
 */
function restui_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'restui.edit':
      return '<p>' . t('Here you can restrict which HTTP methods should this resource support. And within each method, the available serialization formats and authentication providers.') . '</p>';
    case 'restui.list':
      return '<p>' . t('Here you can enable and disable available resources. Once a resource has been enabled, you can restrict its formats and authentication by clicking on its "Edit" link.') . '</p>';
  }
}

/**
 * Implements hook_theme().
 */
function restui_theme() {
  return [
    // List resources.
    'restui_resource_info' => [
      'variables' => [
        'granularity' => [],
        'configuration' => [],
      ],
      'template' => 'restui-resource-info',
    ],
  ];
}

Functions

Namesort descending Description
restui_help Implements hook_help().
restui_theme Implements hook_theme().