1

I've a view, content type, field collection, flexslider to satisfy a single user case. May I know how to export all these three as a single module.

2 Answers 2

3

You could use some Drupal Console export commands for this:

You could use the --module option to specificy which module to export.

It's easier to use the Features module though. From the project page:

A feature is a collection of Drupal entities which taken together satisfy a certain use-case.

Features provides a UI and API for taking different site building components from modules with exportables and bundling them together in a single feature module. A feature module is like any other Drupal module except that it contains additional information in its info file so that configuration can be checked, updated, or reverted programmatically.

Examples of features might be:

  • A blog
  • A pressroom
  • An image gallery
2
  • There is no way to export it using console? Commented Jan 23, 2017 at 6:47
  • I updated my answer with some more information. Commented Jan 23, 2017 at 6:58
2

Install and configure Features module.

Features provides a UI and API for taking different site building components from modules with exportables and bundling them together in a single feature module.

To export using terminal use Drush.

Drush commands for features : https://drushcommands.com/drush-7x/features/features-add/

3
  • There is no way to export it using console? Commented Jan 23, 2017 at 6:47
  • Drupal Console != Drush. But I agree, using features + drush is easier than using DC. Commented Jan 23, 2017 at 7:05
  • @WimMostrey I guess FazeelaAbuZohra asking about terminal. Commented Jan 23, 2017 at 7:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.