function syntaxhighlighter_install in Syntax Highlighter 8
Same name and namespace in other branches
- 6.2 syntaxhighlighter.install \syntaxhighlighter_install()
- 6 syntaxhighlighter.install \syntaxhighlighter_install()
- 7.2 syntaxhighlighter.install \syntaxhighlighter_install()
- 7 syntaxhighlighter.install \syntaxhighlighter_install()
Implements hook_install().
File
- ./
syntaxhighlighter.install, line 14 - Syntax Highlighter module installation file.
Code
function syntaxhighlighter_install() {
$message = t('You must <a href=":link">turn on the Syntax Highlighter filter</a> in an input format to syntax highlight code when using that format.', [
':link' => Url::FromRoute('filter.admin_overview')
->toString(),
]);
$message .= ' ' . t('Then <a href=":link">configure the Syntax Highlighter module</a>.', [
':link' => Url::FromRoute('syntaxhighlighter.settings.form')
->toString(),
]);
$message .= ' ' . t('See <a href=":link">the Syntax Highlighter module README.txt file</a> for instructions.', [
':link' => Url::FromUri('internal:/' . drupal_get_path('module', 'syntaxhighlighter') . '/README.txt')
->toString(),
]);
drupal_set_message(Markup::create($message), 'status');
// Setting up the autoloader script at install time covers the case of an
// installation profile which sets 'use_autoloader' to true.
$config = \Drupal::config('syntaxhighlighter.settings');
_syntaxhighlighter_setup_autoloader_script($config);
}