config:export:view

Export a view in YAML format inside a provided module to reuse in other website.

Usage:

drupal config:export:view [arguments] [options]
  cev

Available options

Option Details
--module モジュール名
--optional-config Export view as an optional YAML configuration in your module
--include-module-dependencies Include module dependencies in module info YAML file
--remove-uuid If set, the configuration will be exported without uuid key.
--remove-config-hash If set, the configuration will be exported without the default site hash key.

Available arguments

Argument Details
view-id View ID

Examples

Provide a view id

drupal config:export:view viewid

You can provide the interactive values like parameter.

drupal config:export:view viewid \
  --module="modulename" \
  --optional-config \
  --include-module-dependencies

Export as config for the provided module, updating the module's info.yml with any module dependencies from the view.

drupal config:export:view viewid \
  --module="modulename" \
  --optional-config \
  --include-module-dependencies