X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcontent_moderation%2Fcontent_moderation.install;fp=web%2Fcore%2Fmodules%2Fcontent_moderation%2Fcontent_moderation.install;h=ddeecb5624eef13378e20263dd5c546c2c7a92d5;hp=e33a35973c6c94a66b5120a412c40894f9cf9c09;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/content_moderation/content_moderation.install b/web/core/modules/content_moderation/content_moderation.install index e33a35973..ddeecb562 100644 --- a/web/core/modules/content_moderation/content_moderation.install +++ b/web/core/modules/content_moderation/content_moderation.install @@ -5,6 +5,21 @@ * Install, update and uninstall functions for the Content Moderation module. */ +/** + * Implements hook_requirements(). + */ +function content_moderation_requirements($phase) { + $requirements = []; + if ($phase === 'install' && \Drupal::moduleHandler()->moduleExists('workspaces')) { + $requirements['workspaces_incompatibility'] = [ + 'severity' => REQUIREMENT_ERROR, + 'description' => t('Content Moderation can not be installed when Workspaces is also installed.'), + ]; + } + + return $requirements; +} + /** * Remove the 'content_revision_tracker' table. */