- 🇺🇸United States thejimbirch Cape Cod, Massachusetts
We got @berdir's blessing in this slack thread.
The original command change record → has been updated to reflect these additions.
Marking as RTBC. Go team default content!
- 🇺🇸United States phenaproxima Massachusetts
An idea -- how about if the
--exclude-field
option accepts not a field name, but a full field ID, likenode.article.field_related_pages
. That would make it entirely clear which fields should be excluded from which entities, regardless of where they are in the dependency tree.It would also be very easy to implement; we would just check fields as we loop over the content entity's field definitions in
Exporter::export()
, and mark the field non-exportable if its ID (FieldConfigInterface::id()
) is in the list. - 🇺🇸United States thejimbirch Cape Cod, Massachusetts
I added the followup.
✨ Exporting Content should allow for excluding fields Active
- Issue created by @thejimbirch
- 🇺🇸United States phenaproxima Massachusetts
Ready for another look - test coverage is complete.
- 🇺🇸United States phenaproxima Massachusetts
Here's what I'm implementing with regard to command-line semantics:
$ drupal content:export node 42 # Dumps YAML, same as now. $ drupal content:export node 42 --dir=my-content # Creates my-content/node/SOME_UUID.yml. [success] The content item "Title of Record" was exported to /full/path/to/my-content. $ drupal content:export node 42 --with-dependencies # Exports recursively to public://content, which is the default of --dir. [success] 20 items were exported to /full/path/to/public/files/content. $ drupal content:export node 42 --with-dependencies --dir=my-content # Does the same thing as above, except with a set destination. [success] 20 items were exported to /full/path/to/my-content.
I think this is pretty clear.