Demos for the Drupal 8 Zero To Hero course.
Frederic G. MARAND 1e2728be9d Step 6: complete implementation of the Blog collection route | 8 years ago | |
---|---|---|
config | 8 years ago | |
src | 8 years ago | |
README.md | 8 years ago | |
dr8_zth.info.yml | 8 years ago | |
dr8_zth.links.action.yml | 8 years ago | |
dr8_zth.links.menu.yml | 8 years ago | |
dr8_zth.links.task.yml | 8 years ago | |
dr8_zth.permissions.yml | 8 years ago | |
dr8_zth.routing.yml | 8 years ago |
This contains a solution to the exercise for the entity chapter. The exercise is the following:
Blog
entity and a BlogType
entity as its bundle entity. Blogs are
entities created by a User
. Various bundles could be a traditional blog, an
image gallery and a vlog.Blog
entity) should be translatable and
revisioned by default.Blog
entity should be at the entity type level
(Blog
), not the entity bundle level (BlogType
).generate
commands.Blog
content entity in it.BlogType
config entity as the bundle entity for Blog
, enabling
its collection route.BlogType
config entity schema to be able to test config import/export and the delete
formBlogType
collection route to show type,
name, description, and operations.BlogType
CRUD by implementing the BlogTypeForm
.Blog
collection route to show id, title,
author, and operations.