You are here

README.txt in Config Entity Revisions 1.x

Config Entity Revisions
=======================

This module provides an API for augmenting Configuration entities in
Drupal 8.5 and later with revision and moderation support.

Technical explanation
---------------------

Drupal 8 has two types of entities: Configuration entities and
content entities. Configuration entities don't support versioning
or workflow. Webforms 8.x-5.x implements webforms as configuration
entities so, by default, you can't have different versions of a webform
or apply approval processes to changes in webforms. This applies across
the board to configuration entities - views, menus and other configuration
entities are also affected.

This module began life as work to implement revisioning and moderation
support for webforms by sitting a content entity alongside the config
entity, having it store a serialised version of the config entity data,
and applying revision and moderation workflows to the content entity.

Along the way, it occurred to the author that perhaps there will be other
config entities for which revisioning and workflow will be useful, so the
generic parts of the code have been split out into this module. If you'd
like to implement revisions and moderation for another configuration
entity, you can follow the pattern in the webform_revisions submodule,
which should be pretty straight forward.

TODO List for implementing revisions for a new config entity
--------------------------------------------------------------

[ ] Review the module you're wanting to extend, noting:
    Module Machine Name: _____________________________
    Config Entity Machine Name: _____________________________
    Config Entity Parameter Placeholder: _____________________________
    Admin Routes:
    - Add form: _____________________________
    - Edit form: _____________________________
    - Delete form: _____________________________
    - Your proposed revisions path and route name: _____________________________
    - Your proposed revision view, revert and delete paths and route names:
      _____________________________
    - Proposed permissions needed to view and manage revisions
    - Any route callbacks you might also need to extend / override
      (Are there content entities related to the config entity that will need
      to have revision IDs recorded and get the associated config entity
      revision loaded when the content entity is loaded? - see webform
      submissions).
       _____________________________________________________
       Associated Content Entity Machine Name: __________________________
[ ] Copy an existing implementation module
[ ] Rename files and classes
[ ] Basic submodule info (.info.yml)
[ ] Documentation (ideally do as you complete the following)
[ ] Unit tests (ideally do as you complete the following)
[ ] Update install schema
[ ] Implement install hooks as required
[ ] Implement uninstall hooks
[ ] Override classes in a hook_entity_type_alter
[ ] Menu items and tasks for accessing the revisions overview
[ ] Revision creation
[ ] Revision table
[ ] Parameter Converter for config entity (easier to debug when you have some
    revisions already created)
[ ] Revision Reversion
[ ] Revision Deletion (associated content entities!)
[ ] Workflow integration
[ ] Views Integration

If there's an associated content entity:
[ ] Add form uses currently published config entity revision
[ ] Add form stores the current config entity revision ID
[ ] Edit form loads the matching config entity revision
[ ] View content entity loads appropriate config entity revision
[ ] Deletion of a config entity revision cascade deletes content entities
    after warning (or other handling if more appropriate)

File

README.txt
View source
  1. Config Entity Revisions
  2. =======================
  3. This module provides an API for augmenting Configuration entities in
  4. Drupal 8.5 and later with revision and moderation support.
  5. Technical explanation
  6. ---------------------
  7. Drupal 8 has two types of entities: Configuration entities and
  8. content entities. Configuration entities don't support versioning
  9. or workflow. Webforms 8.x-5.x implements webforms as configuration
  10. entities so, by default, you can't have different versions of a webform
  11. or apply approval processes to changes in webforms. This applies across
  12. the board to configuration entities - views, menus and other configuration
  13. entities are also affected.
  14. This module began life as work to implement revisioning and moderation
  15. support for webforms by sitting a content entity alongside the config
  16. entity, having it store a serialised version of the config entity data,
  17. and applying revision and moderation workflows to the content entity.
  18. Along the way, it occurred to the author that perhaps there will be other
  19. config entities for which revisioning and workflow will be useful, so the
  20. generic parts of the code have been split out into this module. If you'd
  21. like to implement revisions and moderation for another configuration
  22. entity, you can follow the pattern in the webform_revisions submodule,
  23. which should be pretty straight forward.
  24. TODO List for implementing revisions for a new config entity
  25. --------------------------------------------------------------
  26. [ ] Review the module you're wanting to extend, noting:
  27. Module Machine Name: _____________________________
  28. Config Entity Machine Name: _____________________________
  29. Config Entity Parameter Placeholder: _____________________________
  30. Admin Routes:
  31. - Add form: _____________________________
  32. - Edit form: _____________________________
  33. - Delete form: _____________________________
  34. - Your proposed revisions path and route name: _____________________________
  35. - Your proposed revision view, revert and delete paths and route names:
  36. _____________________________
  37. - Proposed permissions needed to view and manage revisions
  38. - Any route callbacks you might also need to extend / override
  39. (Are there content entities related to the config entity that will need
  40. to have revision IDs recorded and get the associated config entity
  41. revision loaded when the content entity is loaded? - see webform
  42. submissions).
  43. _____________________________________________________
  44. Associated Content Entity Machine Name: __________________________
  45. [ ] Copy an existing implementation module
  46. [ ] Rename files and classes
  47. [ ] Basic submodule info (.info.yml)
  48. [ ] Documentation (ideally do as you complete the following)
  49. [ ] Unit tests (ideally do as you complete the following)
  50. [ ] Update install schema
  51. [ ] Implement install hooks as required
  52. [ ] Implement uninstall hooks
  53. [ ] Override classes in a hook_entity_type_alter
  54. [ ] Menu items and tasks for accessing the revisions overview
  55. [ ] Revision creation
  56. [ ] Revision table
  57. [ ] Parameter Converter for config entity (easier to debug when you have some
  58. revisions already created)
  59. [ ] Revision Reversion
  60. [ ] Revision Deletion (associated content entities!)
  61. [ ] Workflow integration
  62. [ ] Views Integration
  63. If there's an associated content entity:
  64. [ ] Add form uses currently published config entity revision
  65. [ ] Add form stores the current config entity revision ID
  66. [ ] Edit form loads the matching config entity revision
  67. [ ] View content entity loads appropriate config entity revision
  68. [ ] Deletion of a config entity revision cascade deletes content entities
  69. after warning (or other handling if more appropriate)