Demos for the Drupal 8 Zero To Hero course.

Frederic G. MARAND 3b006374ee Step 8: expose a list of the user blogs from a tab on their profile. 7 سال پیش
config 3b006374ee Step 8: expose a list of the user blogs from a tab on their profile. 7 سال پیش
src 3b006374ee Step 8: expose a list of the user blogs from a tab on their profile. 7 سال پیش
templates d52c75d0cd Step 7: complete the Blog CRUD. 7 سال پیش
README.md 3b006374ee Step 8: expose a list of the user blogs from a tab on their profile. 7 سال پیش
blog.drush.inc d52c75d0cd Step 7: complete the Blog CRUD. 7 سال پیش
dr8_zth.info.yml ff7a554bfd Step 2: create a config entity class as the bundle class for the content class. 7 سال پیش
dr8_zth.links.action.yml 1e2728be9d Step 6: complete implementation of the Blog collection route 7 سال پیش
dr8_zth.links.menu.yml ff7a554bfd Step 2: create a config entity class as the bundle class for the content class. 7 سال پیش
dr8_zth.links.task.yml 3b006374ee Step 8: expose a list of the user blogs from a tab on their profile. 7 سال پیش
dr8_zth.module d52c75d0cd Step 7: complete the Blog CRUD. 7 سال پیش
dr8_zth.permissions.yml ff7a554bfd Step 2: create a config entity class as the bundle class for the content class. 7 سال پیش
dr8_zth.routing.yml d52c75d0cd Step 7: complete the Blog CRUD. 7 سال پیش

README.md

Demonstrate various Drupal 8 features.

"blog" branch

This contains a solution to the exercise for the entity chapter. The exercise is the following:

  • Create a 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 items (instances of the Blog entity) should be translatable and revisioned by default.
  • Access control to the Blog entity should be at the entity type level (Blog), not the entity bundle level (BlogType).
  • Both should have a complete CRUD UI: list, display, add/edit, delete
  • Blogs must appear as tabs under the user profile page, with sub-tabs per blog type
  • To better understand what's going on, it is probably better not to use the Drupal console generate commands.

Steps

  1. Create the module and a Blog content entity in it.
  2. Create a BlogType config entity as the bundle entity for Blog, enabling its collection route.
  3. Implement skeletons for add/edit/delete forms and implement a BlogType config entity schema to be able to test config import/export and the delete form
  4. Complete the implementation of the BlogType collection route to show type, name, description, and operations.
  5. Complete the BlogType CRUD by implementing the BlogTypeForm.
  6. Complete the implementation of the Blog collection route to show id, title, author, and operations.
  7. Complete the Blog CRUD by implementing the BlogForm.
  8. Expose a view of the user blogs on their profile as a tab.