config:export:view
Export a view in YAML format inside a provided module to reuse in another website.
Usage:
drupal config:export:view [arguments] [options]
cev
Available options
Option | Details |
---|---|
--module | The Module name. |
--optional-config | Export view as an optional YAML configuration in your module |
--include-module-dependencies | Include view 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
Perform a simple export.
drupal config:export:view viewid
Export as optional config for the provided module.
drupal config:export:view viewid \
--module="modulename" \
--optional-config \
--include-module-dependencies \
--remove-uuid \
--remove-config-hash
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