dr8_zth.routing.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. entity.blog.canonical:
  2. path: '/blog/{blog}'
  3. defaults:
  4. _entity_view: 'blog.full'
  5. _title: 'Blog'
  6. _title_callback: '\Drupal\dr8_zth\Controller\BlogController::blogTitle'
  7. requirements:
  8. _entity_access: 'blog.view'
  9. blog: \d+
  10. entity.blog.add_form:
  11. path: '/admin/structure/blog/manage/{blog_type}/add'
  12. defaults:
  13. _controller: '\Drupal\taxonomy\Controller\TaxonomyController::addForm'
  14. _title: 'Add blog'
  15. requirements:
  16. _entity_create_access: 'blog:{taxonomy_vocabulary}'
  17. entity.blog.edit_form:
  18. path: '/blog/{blog}/edit'
  19. defaults:
  20. _entity_form: 'blog.default'
  21. _title: 'Edit blog'
  22. options:
  23. _admin_route: TRUE
  24. requirements:
  25. _entity_access: 'blog.update'
  26. blog: \d+
  27. entity.blog.delete_form:
  28. path: '/blog/{blog}/delete'
  29. defaults:
  30. _entity_form: 'blog.delete'
  31. _title: 'Delete blog'
  32. options:
  33. _admin_route: TRUE
  34. requirements:
  35. _entity_access: 'blog.delete'
  36. blog: \d+
  37. entity.blog_type.collection:
  38. path: '/admin/structure/blog'
  39. defaults:
  40. _entity_list: 'blog_type'
  41. _title: 'Blog types'
  42. requirements:
  43. _permission: 'administer blog'
  44. entity.blog_type.add_form:
  45. path: '/admin/structure/blog/manage/add'
  46. defaults:
  47. _entity_form: 'blog_type'
  48. _title: 'Add blog type'
  49. requirements:
  50. _entity_create_access: 'blog_type'
  51. entity.blog_type.delete_form:
  52. path: '/admin/structure/blog/manage/{blog_type}/delete'
  53. defaults:
  54. _entity_form: 'blog_type.delete'
  55. _title: 'Delete blog type'
  56. requirements:
  57. _entity_access: 'blog_type.delete'
  58. entity.blog_type.edit_form:
  59. path: '/admin/structure/blog/manage/{blog_type}'
  60. defaults:
  61. _entity_form: 'blog_type.default'
  62. _title_callback: '\Drupal\dr8_zth\Controller\BlogController::typeTitle'
  63. requirements:
  64. _entity_access: 'blog_type.update'