Module definitions
One of the most direct ways to understand these concepts is to see actual code. For example, the following fake hotel_feed
module demonstrates various Drupal module capabilities based on a public, free API of hotel information (https://rapidapi.com/apidojo/api/hotels4).
Configuration
The following files demonstrate the standard configuration found in a Drupal module:
composer.json
: Maintains the module’s composer definitions:{ "name": "drupal/hotel_feed", "description": "A sample module that processes and renders hotel information from a feed.", "type": "drupal-module", "require": { } }
hotel_feed.info.yml
: Maintains the module’s high-level metadata:name: Hotel Feed type: module description: A sample module that processes and renders hotel information from a feed. core: 10.x package: Custom
hotel_feed...