projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website]
/
vendor
/
chi-teck
/
drupal-code-generator
/
templates
/
d7
/
hook
/
file_download_access.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d7/hook/file_download_access.twig
b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/file_download_access.twig
new file mode 100644
(file)
index 0000000..
0648ab5
--- /dev/null
+++ b/
vendor/chi-teck/drupal-code-generator/templates/d7/hook/file_download_access.twig
@@ -0,0
+1,8
@@
+/**
+ * Implements hook_file_download_access().
+ */
+function {{ machine_name }}_file_download_access($file_item, $entity_type, $entity) {
+ if ($entity_type == 'node') {
+ return node_access('view', $entity);
+ }
+}