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 * @addtogroup updates-8.x-1.0-alpha
44 * Adds the 'locale' config setting.
46 function imagemagick_update_8001() {
47 $config_factory = \Drupal::configFactory();
48 $setting = $config_factory->getEditable('imagemagick.settings')
49 ->set('locale', 'en_US.UTF-8')
54 * Adds the 'log_warnings' config setting.
56 function imagemagick_update_8002() {
57 $config_factory = \Drupal::configFactory();
58 $setting = $config_factory->getEditable('imagemagick.settings')
59 ->set('log_warnings', TRUE)
64 * @} End of "addtogroup updates-8.x-1.0-alpha".