function _lingotek_cohesion_test_init_js_files in Lingotek Translation 3.5.x
Same name and namespace in other branches
- 4.0.x tests/modules/lingotek_cohesion_test/lingotek_cohesion_test.install \_lingotek_cohesion_test_init_js_files()
- 3.3.x tests/modules/lingotek_cohesion_test/lingotek_cohesion_test.install \_lingotek_cohesion_test_init_js_files()
- 3.4.x tests/modules/lingotek_cohesion_test/lingotek_cohesion_test.install \_lingotek_cohesion_test_init_js_files()
- 3.6.x tests/modules/lingotek_cohesion_test/lingotek_cohesion_test.install \_lingotek_cohesion_test_init_js_files()
- 3.7.x tests/modules/lingotek_cohesion_test/lingotek_cohesion_test.install \_lingotek_cohesion_test_init_js_files()
- 3.8.x tests/modules/lingotek_cohesion_test/lingotek_cohesion_test.install \_lingotek_cohesion_test_init_js_files()
Some JS are required, but those are generated by the service on import.
See \Drupal\cohesion\Services\LocalFilesManager and "drush cohesion:import".
1 call to _lingotek_cohesion_test_init_js_files()
- lingotek_cohesion_test_install in tests/
modules/ lingotek_cohesion_test/ lingotek_cohesion_test.install - Implements hook_install().
File
- tests/
modules/ lingotek_cohesion_test/ lingotek_cohesion_test.install, line 23 - Install, update and uninstall functions for the lingotek_cohesion_test module.
Code
function _lingotek_cohesion_test_init_js_files() {
\Drupal::service('file_system')
->mkdir(COHESION_JS_PATH, 0777, FALSE);
\Drupal::service('file_system')
->mkdir(COHESION_JS_PATH . '/dx8', 0777, FALSE);
file_put_contents('public://cohesion/scripts/dx8/vendor.js', '{}');
file_put_contents('public://cohesion/scripts/dx8/scripts.js', '{}');
file_put_contents('public://cohesion/scripts/dx8/app.js', '{}');
}