Entity Scaffolder is a drush plugin.
It reads the configuration from yaml files and creates appropriate feature files and preprocess functions.
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.yaml
with 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 es
in %drupal_root% -
A feature called
fe_es
and a module calledes_helper
should 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.twig
and inspecting variablepatternImages