Mock module for content translation tests.
<?php
/**
* @file
* Mock module for content translation tests.
*/
use Drupal\node\Plugin\Core\Entity\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()',
));
}
Name | Description |
---|---|
translation_test_boot | Implements hook_boot(). |
translation_test_node_insert | Implements hook_node_insert(). |