Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / process.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d7/hook/process.twig b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/process.twig
new file mode 100644 (file)
index 0000000..cd42c89
--- /dev/null
@@ -0,0 +1,16 @@
+/**
+ * Implements hook_process().
+ */
+function {{ machine_name }}_process(&$variables, $hook) {
+  // Wraps variables in RDF wrappers.
+  if (!empty($variables['rdf_template_variable_attributes_array'])) {
+    foreach ($variables['rdf_template_variable_attributes_array'] as $variable_name => $attributes) {
+      $context = array(
+        'hook' => $hook,
+        'variable_name' => $variable_name,
+        'variables' => $variables,
+      );
+      $variables[$variable_name] = theme('rdf_template_variable_wrapper', array('content' => $variables[$variable_name], 'attributes' => $attributes, 'context' => $context));
+    }
+  }
+}