image_effects.install in Image Effects 8.3
Same filename and directory in other branches
Install, update and uninstall functions for the image_effects module.
File
image_effects.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the image_effects module.
*/
/**
* Implements hook_requirements().
*/
function image_effects_requirements($phase) {
$requirements = [];
// Check PHP GD2 FreeType support.
if (function_exists('gd_info')) {
$info = gd_info();
if (!function_exists('imagettftext') || !isset($info["FreeType Support"])) {
// No FreeType support, raise warning.
$requirements['image_effects_gd_freetype'] = [
'title' => t('GD library FreeType support'),
'value' => t('Not installed'),
'severity' => REQUIREMENT_WARNING,
'description' => t('The GD Library for PHP is enabled, but was compiled without FreeType support. Image effects using fonts will not be available with the GD image toolkit.'),
];
}
}
return $requirements;
}
/**
* Minimum 2.x schema version to allow upgrading from.
*/
function image_effects_update_last_removed() {
return 8203;
}
Functions
Name![]() |
Description |
---|---|
image_effects_requirements | Implements hook_requirements(). |
image_effects_update_last_removed | Minimum 2.x schema version to allow upgrading from. |