Drupal Module Development & API Flashcards
6 cards from real Drupal practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 6 Drupal Module Development & API flashcards as text
In Drupal module development, what file declares a module's name, description, and package for the admin UI?
Answer: module_name.info.yml
The .info.yml file is required for every Drupal module and defines its human-readable name, description, type, core_version_requirement, and package.
Which Drupal API function is used to implement a hook that reacts after a node is saved?
Answer: hook_node_insert()
hook_node_insert() fires after a new node is saved to the database for the first time, while hook_node_update() fires on subsequent saves.
What is the Drupal service container used for in module development?
Answer: Managing dependency injection of reusable service objects
Drupal's service container (built on Symfony's DependencyInjection component) manages service instantiation and dependency injection throughout custom code.
Which Drupal class should a custom plugin implement to create a new Block plugin type?
Answer: \Drupal\Core\Block\BlockBase
Custom blocks extend BlockBase, which implements the BlockPluginInterface and provides build(), blockAccess(), and blockForm() scaffold methods.
In Drupal's routing system, what file defines URL paths and their corresponding controller classes?
Answer: module_name.routing.yml
Routes are defined in the module's .routing.yml file, mapping URL paths to controller methods and specifying access requirements.
What does the Drupal Entity API's EntityTypeManager service allow developers to do?
Answer: Load, query, create, and delete any entity type
EntityTypeManager provides handlers for loading, saving, deleting, and querying any entity type, replacing older entity_load() procedural functions.
How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy
Sources & references
Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy
- docs.acquia.com — Retake fee, retake policy, score release, exam format, passing score, time limit, score validity, test delivery, eligibility, registration deadline · verified Oct 2026
- acquia.com — Fees, exam format, passing score, time limit · verified Oct 2026