Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/factorial-io/entity_scaffolder
Drush plugin to scaffold entities in Drupal
https://github.com/factorial-io/entity_scaffolder
drupal drupal-7 drush
Last synced: about 1 month ago
JSON representation
Drush plugin to scaffold entities in Drupal
- Host: GitHub
- URL: https://github.com/factorial-io/entity_scaffolder
- Owner: factorial-io
- License: mit
- Created: 2018-05-28T23:54:54.000Z (over 6 years ago)
- Default Branch: develop
- Last Pushed: 2022-09-30T20:01:56.000Z (about 2 years ago)
- Last Synced: 2023-08-11T11:57:16.459Z (over 1 year ago)
- Topics: drupal, drupal-7, drush
- Language: PHP
- Homepage: https://factorial-io.github.io/entity_scaffolder
- Size: 1.49 MB
- Stars: 5
- Watchers: 5
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: History.md
- License: LICENSE
Awesome Lists containing this project
README
## What is it?
Entity Scaffolder is a drush plugin.It reads the configuration from yaml files and creates appropriate feature files and preprocess functions.
## For Drupal 8 and above
Check out https://github.com/factorial-io/phab-entity-scaffolder/ project for drupal 8 and above.## Documentation
A detailed documentation is hosted here https://factorial-io.github.io/entity_scaffolder/.
A video introduction can be found here https://vimeo.com/260325910## Installation
- Checkout the code in `~/.drush/` so that it is recognized as plugin.
- run `composer install`## Example Usage:
1. Create gallery.yaml under `%drupal_root%/.tools/es/fpp/` so the structure looks like the following.```
.tools
|__es
|__fpp
|__gallery.yaml
```2. Populate `gallery.yaml` with following content
```
name: "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```
3. Run `drush es` in %drupal_root%
4. A feature called `fe_es` and a module called `es_helper` should be created automatically with required files.
5. Verify that the FPP called "Awesome Gallery" with "Some Images" field is created.
6. Verify that preprocess function works as expected by creating a template called `fieldable-panels-pane--gallery.tpl.twig` and inspecting variable `patternImages`