function ace_editor_install in Ace Code Editor 8
Same name and namespace in other branches
- 7 ace_editor.install \ace_editor_install()
Implements hook_enable().
File
- ./
ace_editor.install, line 11 - Install functions for the Ace Editor module.
Code
function ace_editor_install() {
$lib_path = ace_editor_lib_path();
if (!$lib_path) {
\Drupal::messenger()
->addMessage(t('Ace library is missing. Please download the more convenient version to you from <a href="@link">Ace Editor Page</a> and copy it under @path; Ace Editor module will use the first found version of ace.js located under @path.', [
'@link' => 'https://github.com/ajaxorg/ace-builds',
'@path' => '/libraries/',
]), 'warning');
}
else {
\Drupal::messenger()
->addMessage(t('Ace library found at @location', [
'@location' => $lib_path,
]));
}
}