You are here

customfilter.routing.yml in Custom filter 2.0.x

Same filename and directory in other branches
  1. 8 customfilter.routing.yml

File

customfilter.routing.yml
View source
  1. # List with all filters
  2. entity.customfilter.list:
  3. path: '/admin/config/content/customfilter'
  4. defaults:
  5. _entity_list: 'customfilter'
  6. _title: 'List of custom filters'
  7. requirements:
  8. _permission: 'administer customfilter'
  9. # Add a new filter
  10. entity.customfilter.add_form:
  11. path: '/admin/config/content/customfilter/add'
  12. defaults:
  13. _entity_form: customfilter.add
  14. _title: 'Add a custom filter'
  15. requirements:
  16. _permission: 'administer customfilter'
  17. # Edit an existing filter
  18. entity.customfilter.edit_form:
  19. path: 'admin/config/content/customfilter/filter/{customfilter}/edit'
  20. defaults:
  21. _entity_form: customfilter.edit
  22. _title: 'Edit custom filter'
  23. requirements:
  24. _permission: 'administer customfilter'
  25. # Delete an existing filter
  26. entity.customfilter.delete_form:
  27. path: 'admin/config/content/customfilter/filter/{customfilter}/delete'
  28. defaults:
  29. _entity_form: customfilter.delete
  30. _title: 'Delete custom filter'
  31. requirements:
  32. _permission: 'administer customfilter'
  33. # List the rules for an existing filter
  34. customfilter.rules.list:
  35. path: 'admin/config/content/customfilter/filter/{customfilter}'
  36. defaults:
  37. _form: '\Drupal\customfilter\Form\RulesListForm'
  38. _title: 'List rules'
  39. requirements:
  40. _permission: 'administer customfilter'
  41. # Add a new rule for the filter
  42. customfilter.rules.add:
  43. path: 'admin/config/content/customfilter/filter/{customfilter}/add'
  44. defaults:
  45. _form: '\Drupal\customfilter\Form\RulesAddEditForm'
  46. _title: 'Add rule'
  47. operation: 'add'
  48. rule_id: ''
  49. requirements:
  50. _permission: 'administer customfilter'
  51. # Page to edit an existing rule
  52. customfilter.rules.edit:
  53. path: 'admin/config/content/customfilter/filter/{customfilter}/rule/{rule_id}/edit'
  54. defaults:
  55. _form: '\Drupal\customfilter\Form\RulesAddEditForm'
  56. _title: 'Edit rule'
  57. operation: 'edit'
  58. requirements:
  59. _permission: 'administer customfilter'
  60. # Page to delete a rule
  61. customfilter.rules.delete:
  62. path: 'admin/config/content/customfilter/filter/{customfilter}/rule/{rule_id}/delete'
  63. defaults:
  64. _form: '\Drupal\customfilter\Form\CustomFilterRulesDeleteForm'
  65. _title: 'Delete rule'
  66. operation: 'delete'
  67. requirements:
  68. _permission: 'administer customfilter'
  69. # Page to add a new sub rule
  70. customfilter.rules.add.subrule:
  71. path: 'admin/config/content/customfilter/filter/{customfilter}/rule/{rule_id}/add'
  72. defaults:
  73. _form: '\Drupal\customfilter\Form\RulesAddEditForm'
  74. _title: 'Add subrule'
  75. operation: 'add'
  76. requirements:
  77. _permission: 'administer customfilter'