You are here

block_content.routing.yml in Drupal 8

core/modules/block_content/block_content.routing.yml

File

core/modules/block_content/block_content.routing.yml
View source
  1. block_content.add_page:
  2. path: '/block/add'
  3. defaults:
  4. _controller: '\Drupal\block_content\Controller\BlockContentController::add'
  5. _title: 'Add custom block'
  6. options:
  7. _admin_route: TRUE
  8. requirements:
  9. _permission: 'administer blocks'
  10. block_content.add_form:
  11. path: '/block/add/{block_content_type}'
  12. defaults:
  13. _controller: '\Drupal\block_content\Controller\BlockContentController::addForm'
  14. _title_callback: '\Drupal\block_content\Controller\BlockContentController::getAddFormTitle'
  15. options:
  16. _admin_route: TRUE
  17. requirements:
  18. _permission: 'administer blocks'
  19. entity.block_content.canonical:
  20. path: '/block/{block_content}'
  21. defaults:
  22. _entity_form: 'block_content.edit'
  23. options:
  24. _admin_route: TRUE
  25. requirements:
  26. _entity_access: 'block_content.update'
  27. block_content: \d+
  28. entity.block_content.edit_form:
  29. path: '/block/{block_content}'
  30. defaults:
  31. _entity_form: 'block_content.edit'
  32. options:
  33. _admin_route: TRUE
  34. requirements:
  35. _entity_access: 'block_content.update'
  36. block_content: \d+
  37. entity.block_content.delete_form:
  38. path: '/block/{block_content}/delete'
  39. defaults:
  40. _entity_form: 'block_content.delete'
  41. _title: 'Delete'
  42. options:
  43. _admin_route: TRUE
  44. requirements:
  45. _entity_access: 'block_content.delete'
  46. block_content: \d+
  47. block_content.type_add:
  48. path: '/admin/structure/block/block-content/types/add'
  49. defaults:
  50. _entity_form: 'block_content_type.add'
  51. _title: 'Add'
  52. requirements:
  53. _permission: 'administer blocks'
  54. entity.block_content.collection:
  55. path: '/admin/structure/block/block-content'
  56. defaults:
  57. _title: 'Custom block library'
  58. _entity_list: 'block_content'
  59. requirements:
  60. _permission: 'administer blocks'