X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcontent_moderation%2Fcontent_moderation.install;h=ddeecb5624eef13378e20263dd5c546c2c7a92d5;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=e33a35973c6c94a66b5120a412c40894f9cf9c09;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website 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. */