what we need to know to create custom modules in drupal 8
DESCRIPTION
- main folders structure - Symfony components in Drupal 8 - class autoloading standard - plugin systemTRANSCRIPT
What we need to know to create custom modules in Drupal 8
Oleksandr Ivanchenko - @alexsergivan
Main folders structure
.info.yml
.routing.yml
PSR-4 autoloading standard
DefaultController.php
Plugin system
“The D8 plugin system provides a set of guidelines and reusable code components to allow developers to expose pluggable components within their code and (as needed) support managing these components through the user interface.” drupal.org
Plugin systems examples:- Blocks- Field types- Field widget- Field formatters- Image effects- Input filter- CKEditor buttons- Entity types
Block plugin example
Drupal 8 forms
Add js
https://github.com/hechoendrupal/DrupalAppConsole
Drupal 8 Console scaffolding module generator