- Issue created by @swirt
- Status changed to Fixed
about 1 year ago 7:09am 27 October 2023 - πΊπΈUnited States swirt Florida
This feature has been added.
The module now has a built in system for exporting CM Documents from you local environment and having them import into your production site when your code deploys.
Drush commands
- Export:
drush content-model-documentation:export <id>
- Import:
drush content-model-documentation:import '/alias/of/the/cm-document'
hook_update_n()
use Drupal\content_model_documentation\CmDocumentMover\CmDocumentImport; /** * Import some CM Documents. */ function <local_module>_update_9017() { $cm_documents_to_import = [ '/admin/structure/types/manage/promo_banner/document', '/admin/structure/types/manage/full_width_banner_alert/document', ]; // If set to true, the hook_update calls itself a failure if any of the documents are rejected. Setting to FALSE causes the hook_update to call itself complete even if a document(s) get rejected. $strict = TRUE; return CmDocumentImport::import($cm_documents_to_import, $strict); } See the module help page / readme for step by steps.
- Export:
- Status changed to Fixed
about 1 year ago 1:08pm 27 October 2023