Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / module / content-entity / model.routing.yml.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d8/module/content-entity/model.routing.yml.twig b/vendor/chi-teck/drupal-code-generator/templates/d8/module/content-entity/model.routing.yml.twig
new file mode 100755 (executable)
index 0000000..f4dcdec
--- /dev/null
@@ -0,0 +1,48 @@
+{% if fieldable %}
+entity.{{ entity_type_id }}.settings:
+  path: 'admin/structure/{{ entity_type_id|u2h }}'
+  defaults:
+    _form: '\Drupal\{{ machine_name }}\Form\{{ class_prefix }}SettingsForm'
+    _title: '{{ entity_type_label }}'
+  requirements:
+    _permission: 'administer {{ entity_type_label|lower }}'
+{% endif %}
+entity.{{ entity_type_id }}.collection:
+  path: '/admin/content/{{ entity_type_id|u2h }}'
+  defaults:
+    _entity_list: '{{ entity_type_id }}'
+    _title: '{{ entity_type_label|plural }}'
+  requirements:
+    _permission: 'access {{ entity_type_label|lower }} overview'
+
+entity.{{ entity_type_id }}.canonical:
+  path: '{{ entity_base_path }}/{{ '{' }}{{ entity_type_id }}{{ '}' }}'
+  defaults:
+    _entity_view: '{{ entity_type_id }}'
+    _title: '{{ entity_type_label }}'
+  requirements:
+    _entity_access: '{{ entity_type_id }}.view'
+
+entity.{{ entity_type_id }}.add_form:
+  path: '{{ entity_base_path }}/add'
+  defaults:
+    _entity_form: {{ entity_type_id }}.add
+    _title: 'Add {{ entity_type_label }}'
+  requirements:
+    _entity_create_access: {{ entity_type_id }}
+
+entity.{{ entity_type_id }}.edit_form:
+  path: '{{ entity_base_path }}/{{ '{' }}{{ entity_type_id  }}{{ '}' }}/edit'
+  defaults:
+    _entity_form: {{ entity_type_id }}.edit
+    _title: 'Edit {{ entity_type_label }}'
+  requirements:
+    _entity_access: {{ entity_type_id }}.update
+
+entity.{{ entity_type_id }}.delete_form:
+  path: '{{ entity_base_path }}/{{ '{' }}{{ entity_type_id }}{{ '}' }}/delete'
+  defaults:
+    _entity_form: {{ entity_type_id }}.delete
+    _title: 'Delete {{ entity_type_label }}'
+  requirements:
+    _entity_access: {{ entity_type_id }}.delete