layout_discovery.install 575 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * @file
  4. * Install, update, and uninstall functions for the Layout Discovery module.
  5. */
  6. /**
  7. * Implements hook_requirements().
  8. */
  9. function layout_discovery_requirements($phase) {
  10. $requirements = [];
  11. if ($phase === 'install') {
  12. if (\Drupal::moduleHandler()->moduleExists('layout_plugin')) {
  13. $requirements['layout_discovery'] = [
  14. 'description' => t('Layout Discovery cannot be installed because the Layout Plugin module is installed and incompatible.'),
  15. 'severity' => REQUIREMENT_ERROR,
  16. ];
  17. }
  18. }
  19. return $requirements;
  20. }