You are here

protected function LingotekFunctionalJavascriptTestBase::saveLingotekContentTranslationSettingsForNodeTypes in Lingotek Translation 3.4.x

Same name and namespace in other branches
  1. 8.2 tests/src/FunctionalJavascript/LingotekFunctionalJavascriptTestBase.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekFunctionalJavascriptTestBase::saveLingotekContentTranslationSettingsForNodeTypes()
  2. 4.0.x tests/src/FunctionalJavascript/LingotekFunctionalJavascriptTestBase.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekFunctionalJavascriptTestBase::saveLingotekContentTranslationSettingsForNodeTypes()
  3. 3.0.x tests/src/FunctionalJavascript/LingotekFunctionalJavascriptTestBase.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekFunctionalJavascriptTestBase::saveLingotekContentTranslationSettingsForNodeTypes()
  4. 3.1.x tests/src/FunctionalJavascript/LingotekFunctionalJavascriptTestBase.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekFunctionalJavascriptTestBase::saveLingotekContentTranslationSettingsForNodeTypes()
  5. 3.2.x tests/src/FunctionalJavascript/LingotekFunctionalJavascriptTestBase.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekFunctionalJavascriptTestBase::saveLingotekContentTranslationSettingsForNodeTypes()
  6. 3.3.x tests/src/FunctionalJavascript/LingotekFunctionalJavascriptTestBase.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekFunctionalJavascriptTestBase::saveLingotekContentTranslationSettingsForNodeTypes()
  7. 3.5.x tests/src/FunctionalJavascript/LingotekFunctionalJavascriptTestBase.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekFunctionalJavascriptTestBase::saveLingotekContentTranslationSettingsForNodeTypes()
  8. 3.6.x tests/src/FunctionalJavascript/LingotekFunctionalJavascriptTestBase.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekFunctionalJavascriptTestBase::saveLingotekContentTranslationSettingsForNodeTypes()
  9. 3.7.x tests/src/FunctionalJavascript/LingotekFunctionalJavascriptTestBase.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekFunctionalJavascriptTestBase::saveLingotekContentTranslationSettingsForNodeTypes()
  10. 3.8.x tests/src/FunctionalJavascript/LingotekFunctionalJavascriptTestBase.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekFunctionalJavascriptTestBase::saveLingotekContentTranslationSettingsForNodeTypes()

Save Lingotek translation settings for node types.

Example:

$this
  ->saveLingotekContentTranslationSettingsForNodeTypes([
  'article',
  'page',
], manual);

Parameters

array $node_types: The node types we want to enable.

string $profile: The profile id we want to use.

File

tests/src/FunctionalJavascript/LingotekFunctionalJavascriptTestBase.php, line 317

Class

LingotekFunctionalJavascriptTestBase

Namespace

Drupal\Tests\lingotek\FunctionalJavascript

Code

protected function saveLingotekContentTranslationSettingsForNodeTypes($node_types = [
  'article',
], $profile = 'automatic') {
  $settings = [];
  foreach ($node_types as $node_type) {
    $settings['node'][$node_type] = [
      'profiles' => $profile,
      'fields' => [
        'title' => 1,
        'body' => 1,
      ],
    ];
  }
  $this
    ->saveLingotekContentTranslationSettings($settings);
}