5 * ImageMagick installation scripts.
9 * Implements hook_requirements().
11 function imagemagick_requirements($phase) {
15 if ($phase === 'install' && stripos(ini_get('disable_functions'), 'proc_open') !== FALSE) {
17 // proc_open() is disabled.
18 $severity = REQUIREMENT_ERROR;
19 $reported_info[] = t("The <a href=':proc_open_url'>proc_open()</a> PHP function is disabled. It must be enabled for the toolkit to be installed. Edit the <a href=':disable_functions_url'>disable_functions</a> entry in your php.ini file, or consult your hosting provider.", [
20 ':proc_open_url' => 'http://php.net/manual/en/function.proc-open.php',
21 ':disable_functions_url' => 'http://php.net/manual/en/ini.core.php#ini.disable-functions',
26 'title' => t('ImageMagick'),
28 '#markup' => implode('<br />', $reported_info),
30 'severity' => $severity,
39 * Enable file_mdm module.
41 function imagemagick_update_8201() {
42 \Drupal::service('module_installer')->install([
48 * Adds the 'prepend_pre_source' config setting.
50 function imagemagick_update_8202() {
51 $config_factory = \Drupal::configFactory();
52 $setting = $config_factory->getEditable('imagemagick.settings')
53 ->set('prepend_pre_source', FALSE)
58 * Clear caches to discover service changes.
60 function imagemagick_update_8203() {