You are here

function autofloat_install in AutoFloat 8

Same name and namespace in other branches
  1. 6.2 autofloat.install \autofloat_install()
  2. 6 autofloat.install \autofloat_install()
  3. 7.2 autofloat.install \autofloat_install()
  4. 7 autofloat.install \autofloat_install()

Implements hook_install().

File

./autofloat.install, line 14
Install, update and uninstall functions.

Code

function autofloat_install() {
  $url = Url::fromRoute('filter.admin_overview');
  $formats_link = Link::fromTextAndUrl(t('Configuration > Content authoring > Text formats'), $url)
    ->toString();
  $text = t('Add the AutoFloat filter to a text format under @formats_link. Move it below other image related filters in the filter processing order.', [
    '@formats_link' => $formats_link,
  ]);
  \Drupal::messenger()
    ->addMessage($text);
}