You are here

rest_test.module in Zircon Profile 8

Same filename and directory in other branches
  1. 8.0 core/modules/rest/tests/modules/rest_test/rest_test.module

Contains hook implementations for testing REST module.

File

core/modules/rest/tests/modules/rest_test/rest_test.module
View source
<?php

/**
 * @file
 * Contains hook implementations for testing REST module.
 */

/**
 * Implements hook_rest_type_uri_alter().
 */
function rest_test_rest_type_uri_alter(&$uri, $context = array()) {
  if (!empty($context['rest_test'])) {
    $uri = 'rest_test_type';
  }
}

/**
 * Implements hook_rest_relation_uri_alter().
 */
function rest_test_rest_relation_uri_alter(&$uri, $context = array()) {
  if (!empty($context['rest_test'])) {
    $uri = 'rest_test_relation';
  }
}