Skip to content

Commit

Permalink
Closes #3924: Install ImageMagick by default on Pantheon sites.
Browse files Browse the repository at this point in the history
  • Loading branch information
joeparsons authored Dec 4, 2024
1 parent 2c68cec commit 99f1415
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions az_quickstart.install
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function az_quickstart_install() {
$extra_modules = [
'pantheon_advanced_page_cache',
'environment_indicator',
'imagemagick',
];
}
else {
Expand Down Expand Up @@ -217,3 +218,19 @@ function az_quickstart_update_1020901(&$sandbox) {
$sandbox['#finished'] = empty($sandbox['max']) ? 1 : $sandbox['progress'] / $sandbox['max'];
return t('Updated langcode on %count menu links.', ['%count' => $sandbox['progress']]);
}

/**
* Ensure Pantheon sites have the imagemagick module installed.
*/
function az_quickstart_update_1021101() {
if (defined('PANTHEON_ENVIRONMENT')) {
try {
\Drupal::service('module_installer')->install(['imagemagick']);
}
catch (MissingDependencyException $e) {
return t('ImageMagick module not available to install.');
}

return t('ImageMagick module installed.');
}
}

0 comments on commit 99f1415

Please sign in to comment.