You are here

hold_test.module in Drupal 8

Same filename and directory in other branches
  1. 9 core/modules/system/tests/modules/hold_test/hold_test.module

Contains functions for testing hold request/response.

File

core/modules/system/tests/modules/hold_test/hold_test.module
View source
<?php

/**
 * @file
 * Contains functions for testing hold request/response.
 */

/**
 * Request hold.
 *
 * @param bool $status
 *   TRUE - enable hold, FALSE - disable hold.
 */
function hold_test_request($status) {
  $site_path = \Drupal::service('site.path');
  file_put_contents($site_path . '/hold_test_request.txt', $status);
}

/**
 * Response hold.
 *
 * @param bool $status
 *   TRUE - enable hold, FALSE - disable hold.
 */
function hold_test_response($status) {
  $site_path = \Drupal::service('site.path');
  file_put_contents($site_path . '/hold_test_response.txt', $status);
}

Functions

Namesort descending Description
hold_test_request Request hold.
hold_test_response Response hold.