Entity Scaffolder is a drush plugin.
It reads the configuration from yaml files and creates appropriate feature files and preprocess functions.
Check out https://github.com/factorial-io/phab-entity-scaffolder/ project for drupal 8 and above.
A detailed documentation is hosted here https://factorial-io.github.io/entity_scaffolder/. A video introduction can be found here https://vimeo.com/260325910
- Checkout the code in
~/.drush/so that it is recognized as plugin. - run
composer install
-
Create gallery.yaml under
%drupal_root%/.tools/es/fpp/so the structure looks like the following..tools |__es |__fpp |__gallery.yaml -
Populate
gallery.yamlwith following contentname: "Awesome Gallery" machine_name: "gallery" fields: slideshow_images: map: patternImages type: image cardinality: -1 label: Some Images image_style: thumbnail headline: map: description type: text_long text_format_filtered_html: full_html label: Headline caption: map: title type: text text_format_filtered_html: full_html label: Caption -
Run
drush esin %drupal_root% -
A feature called
fe_esand a module calledes_helpershould be created automatically with required files. -
Verify that the FPP called "Awesome Gallery" with "Some Images" field is created.
-
Verify that preprocess function works as expected by creating a template called
fieldable-panels-pane--gallery.tpl.twigand inspecting variablepatternImages