trailing_slash.install in Trailing Slash 8
Same filename and directory in other branches
File
trailing_slash.installView source
<?php
include_once 'trailing_slash.module';
/**
* Implements hook_install().
*/
function trailing_slash_install() {
// To be executed after ServiceProvider.
module_set_weight('trailing_slash', 1);
}
/**
* Implements hook_requirements().
*/
function trailing_slash_requirements($phase) {
$requirements = [];
$requirements['php'] = [
'title' => t('PHP'),
'value' => TRAILING_SLASH_MINIMUM_PHP,
];
if (version_compare(phpversion(), TRAILING_SLASH_MINIMUM_PHP) < 0) {
$requirements['php']['description'] = t('Your PHP installation is too old. This module requires at least PHP %version.', [
'%version' => TRAILING_SLASH_MINIMUM_PHP,
]);
$requirements['php']['severity'] = REQUIREMENT_ERROR;
}
return $requirements;
}
Functions
Name | Description |
---|---|
trailing_slash_install | Implements hook_install(). |
trailing_slash_requirements | Implements hook_requirements(). |