translation_test.module

Mock module for content translation tests.

File

drupal/core/modules/translation/tests/translation_test.module
View source
<?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()',
  ));
}

Functions