drupal/core/modules/translation/tests/translation_test.module

25 lines
503 B
Plaintext

<?php
/**
* @file
* Mock module for content translation tests.
*/
use Drupal\node\Node;
/**
* Implements hook_node_insert().
*/
function translation_test_node_insert(Node $node) {
drupal_write_record('node', $node, 'nid');
}
/**
* Implements hook_boot().
*/
function translation_test_boot() {
// We run the t() function during hook_boot() to make sure it doesn't break
// the boot process.
$translation = t("Calling the t() process during @boot.", array('@boot' => 'hook_boot()'));
}