Version 1
[yaffs-website] / web / modules / contrib / twig_xdebug / twig_xdebug.install
diff --git a/web/modules/contrib/twig_xdebug/twig_xdebug.install b/web/modules/contrib/twig_xdebug/twig_xdebug.install
new file mode 100644 (file)
index 0000000..7f65908
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * @file
+ * Twig Xdebug install and update hooks.
+ */
+
+/**
+ * Implements hook_requirements().
+ */
+function twig_xdebug_requirements($phase) {
+  $requirements = [];
+  if ($phase == 'install') {
+    if (!class_exists('\Ajgl\Twig\Extension\BreakpointExtension')) {
+      $requirements['breakpoints_library'] = [
+        'description' => t('Twig Xdebug requires the ajgl/breakpoint-twig-extension library.'),
+        'severity' => REQUIREMENT_ERROR,
+      ];
+    }
+  }
+
+  return $requirements;
+}