diff core/modules/layout_discovery/layout_discovery.install @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/modules/layout_discovery/layout_discovery.install	Thu Jul 05 14:24:15 2018 +0000
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * @file
+ * Install, update, and uninstall functions for the Layout Discovery module.
+ */
+
+/**
+ * Implements hook_requirements().
+ */
+function layout_discovery_requirements($phase) {
+  $requirements = [];
+  if ($phase === 'install') {
+    if (\Drupal::moduleHandler()->moduleExists('layout_plugin')) {
+      $requirements['layout_discovery'] = [
+        'description' => t('Layout Discovery cannot be installed because the Layout Plugin module is installed and incompatible.'),
+        'severity' => REQUIREMENT_ERROR,
+      ];
+    }
+  }
+  return $requirements;
+}