function geshifilter_install in GeSHi Filter for syntax highlighting 8.2
Same name and namespace in other branches
- 8 geshifilter.install \geshifilter_install()
- 5.2 geshifilter.install \geshifilter_install()
- 6 geshifilter.install \geshifilter_install()
- 7 geshifilter.install \geshifilter_install()
Implements hook_install().
File
- ./
geshifilter.install, line 18 - Installation and uninstallation functions for the GeSHi filter.
Code
function geshifilter_install() {
\Drupal::messenger()
->addStatus(t('GeSHi filter is installed. You should now @configure-geshi
and enable it in the desired @text-formats.', [
// Geshifilter`s route seems to be unknown at this point, so use
// Url::fromUri() with base: scheme instead Url::fromRoute().
'@configure-geshi' => \Drupal::service('link_generator')
->generate(t('configure the GeSHi filter'), Url::fromUri('base:admin/config/content/formats/geshifilter')),
'@text-formats' => \Drupal::service('link_generator')
->generate(t('text formats'), Url::fromUri('base:admin/config/content/formats')),
]));
}