navigation404.install in 404 Navigation 8
Same filename and directory in other branches
install file.
File
navigation404.installView source
<?php
/**
* @file install file.
*/
/**
* Implements hook_install().
*
* If site_404 is not set, all menu-related items disappear on 404.
*/
function navigation404_install() {
if (!Drupal::config('system.site')
->get('page.404')) {
Drupal::config('system.site')
->set('page.404', NAVIGATION404_PAGE)
->save();
}
}
/**
* Implements hook_uninstall().
*/
function navigation404_uninstall() {
if (Drupal::config('system.site')
->get('page.404') == NAVIGATION404_PAGE) {
Drupal::config('system.site')
->delete('page.404');
}
}
Functions
Name | Description |
---|---|
navigation404_install | Implements hook_install(). |
navigation404_uninstall | Implements hook_uninstall(). |