Same name and namespace in other branches
  1. 8.9.x core/modules/workspaces/workspaces.install \workspaces_requirements()
  2. 9 core/modules/workspaces/workspaces.install \workspaces_requirements()

Implements hook_requirements().

File

core/modules/workspaces/workspaces.install, line 14
Contains install, update and uninstall functions for the Workspaces module.

Code

function workspaces_requirements($phase) {
  $requirements = [];
  if ($phase === 'install') {
    if (\Drupal::moduleHandler()
      ->moduleExists('workspace')) {
      $requirements['workspace_incompatibility'] = [
        'severity' => REQUIREMENT_ERROR,
        'description' => t('Workspaces can not be installed when the contributed Workspace module is also installed. See the <a href=":link">upgrade path</a> page for more information on how to upgrade.', [
          ':link' => 'https://www.drupal.org/node/2987783',
        ]),
      ];
    }
  }
  return $requirements;
}