An example Drupal 8 fitness module which features custom content entities, composer dependencies, and a custom Entity Reference Field Type plugin.
This repository is meant to acompany the presentation:
Given at
Run the following in an Apache/PHP environment to download Drupal 8.
$ composer create-project drupal-composer/drupal-project proj_name --stability dev --no-interaction
Add my github repository and package to your project composer.json.
$ cd proj_name/
$ composer config repositories.example_fitness vcs https://github.com/jcandan/example_fitness
$ composer require jcandan/example_fitness:dev-master
At this point, you may visit the site and install it via the web interface or
use drush site-install
. Here is an example using a postgres database:
$ cd web/
$ ../vendor/bin/drush site-install standard --db-url=pgsql://[DB_USER]:[DB_PASSWORD]@127.0.0.1:5432/proj_name
Note: take note of the generated admin password.
$ cd proj_name/web/
$ drush en example_fitness -y
Visit /admin/structure/workout/add
to see and manage the Workout and Exercise entities.