Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / hook / entity_type_alter.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d8/hook/entity_type_alter.twig b/vendor/chi-teck/drupal-code-generator/templates/d8/hook/entity_type_alter.twig
new file mode 100644 (file)
index 0000000..ef3f994
--- /dev/null
@@ -0,0 +1,9 @@
+/**
+ * Implements hook_entity_type_alter().
+ */
+function {{ machine_name }}_entity_type_alter(array &$entity_types) {
+  /** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */
+  // Set the controller class for nodes to an alternate implementation of the
+  // Drupal\Core\Entity\EntityStorageInterface interface.
+  $entity_types['node']->setStorageClass('Drupal\mymodule\MyCustomNodeStorage');
+}