You are here

protected function I18nBookNavigationTestBase::translateNodes in Book translation 7.2

Translate nodes.

Parameters

array $nodes: The list of nodes to translate.

string $language: The language to which to translate the nodes.

bool $use_entity_translation: (optional) Wether to use Entity translation. Defaults to false.

Return value

array A list of translation nodes.

5 calls to I18nBookNavigationTestBase::translateNodes()
I18nBookNavigationMenuBlockTestCase::testMenuBlockIntegration in tests/i18n_book_navigation.test
Test menu_block integration.
I18nBookNavigationPanelsTestCase::testPanelsIntegration in tests/i18n_book_navigation.test
Test panels integration.
I18nBookNavigationTestBase::outlineTranslation in tests/i18n_book_navigation.test
Test outline translations.
I18nBookNavigationTestCase::testCoreLogic in tests/i18n_book_navigation.test
Test core logic.
I18nBookNavigationTestCase::testIssue1619026 in tests/i18n_book_navigation.test
Regression test for [#1619026].

File

tests/i18n_book_navigation.test, line 171
Unit tests for the Book translation module.

Class

I18nBookNavigationTestBase
@file Unit tests for the Book translation module.

Code

protected function translateNodes($nodes, $language, $use_entity_translation = FALSE) {
  $new_nodes = array();
  foreach ($nodes as $node) {
    $new_nodes[] = $this
      ->translateBookNode($node, $language, $use_entity_translation);
  }
  return $new_nodes;
}