Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / language_negotiation_info.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d7/hook/language_negotiation_info.twig b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/language_negotiation_info.twig
new file mode 100644 (file)
index 0000000..3e346bd
--- /dev/null
@@ -0,0 +1,20 @@
+/**
+ * Implements hook_language_negotiation_info().
+ */
+function {{ machine_name }}_language_negotiation_info() {
+  return array(
+    'custom_language_provider' => array(
+      'callbacks' => array(
+        'language' => 'custom_language_provider_callback',
+        'switcher' => 'custom_language_switcher_callback',
+        'url_rewrite' => 'custom_language_url_rewrite_callback',
+      ),
+      'file' => drupal_get_path('module', 'custom') . '/custom.module',
+      'weight' => -4,
+      'types' => array('custom_language_type'),
+      'name' => t('Custom language negotiation provider'),
+      'description' => t('This is a custom language negotiation provider.'),
+      'cache' => 0,
+    ),
+  );
+}