Acquia Certified Developer D10 Practice Exam, Exams of Technology

A comprehensive exam that tests backend Drupal 10 development knowledge. Topics include custom module development, hooks, services, routing, configuration management, theme integration, performance optimization, debugging, and secure coding practices. It ensures candidates can build scalable, high-performing, and robust Drupal applications following Drupal’s architectural standards.

Typology: Exams

2025/2026

Available from 01/08/2026

shilpi-jain-1
shilpi-jain-1 🇮🇳

4.2

(5)

29K documents

1 / 91

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Acquia Certified Developer D10 Practice
Exam
**Question 1. Which HTML5 element is most appropriate for marking up the main navigation
links of a site?**
A) `<section>`
B) `<nav>`
C) `<aside>`
D) `<footer>`
Answer: B
Explanation: The `<nav>` element semantically represents a block of navigation links, improving
accessibility and SEO.
**Question 2. In CSS3, which selector matches elements that are direct children of a `<ul>`
element?**
A) `ul > li`
B) `ul li`
C) `ul + li`
D) `ul ~ li`
Answer: A
Explanation: The `>` combinator selects only immediate child elements, so `ul > li` matches `<li>`
elements directly under `<ul>`.
**Question 3. Which JavaScript method creates a shallow copy of an array?**
A) `Array.clone()`
B) `Array.slice()`
C) `Array.copy()`
D) `Array.splice()`
Answer: B
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b

Partial preview of the text

Download Acquia Certified Developer D10 Practice Exam and more Exams Technology in PDF only on Docsity!

Exam

Question 1. Which HTML5 element is most appropriate for marking up the main navigation links of a site? A) <section> B) <nav> C) <aside> D) <footer> Answer: B Explanation: The <nav> element semantically represents a block of navigation links, improving accessibility and SEO. Question 2. In CSS3, which selector matches elements that are direct children of a <ul> element? A) ul > li B) ul li C) ul + li D) ul ~ li Answer: A Explanation: The > combinator selects only immediate child elements, so ul > li matches <li> elements directly under <ul>. Question 3. Which JavaScript method creates a shallow copy of an array? A) Array.clone() B) Array.slice() C) Array.copy() D) Array.splice() Answer: B

Exam

Explanation: Array.slice() without arguments returns a shallow copy of the entire array. Question 4. In jQuery, which function is used to run code after the DOM is fully loaded? A) $(window).load() B) $(document).ready() C) $(document).onLoad() D) $(element).init() Answer: B Explanation: $(document).ready() (or the shortcut $(function(){})) executes when the DOM is ready, before images and other resources finish loading. Question 5. Which Git command stages all modified and deleted files for the next commit? A) git add . B) git commit - a C) git stage * D) git push Answer: A Explanation: git add . adds all changes in the current directory (including deletions) to the staging area. Question 6. What is the purpose of the git rebase command? A) Merge two branches without creating a merge commit. B) Delete a remote branch. C) Rewrite the commit history by applying commits onto a new base. D) List all remote repositories.

Exam

B) @media (min-width: 600px) {} C) @media (width: 600px) {} D) @media (device-width: 600px) {} Answer: A Explanation: max-width applies the styles when the viewport is 600 px or narrower. Question 10. What does the “mobile‑first” design approach emphasize? A) Designing for desktop screens before scaling down. B) Starting with a minimal layout for small screens and enhancing for larger screens. C) Using only mobile‑only CSS frameworks. D) Ignoring tablet and desktop breakpoints. Answer: B Explanation: Mobile‑first means building the base styles for the smallest devices and adding progressive enhancements for larger viewports. Question 11. Which Drupal core field type stores plain text without any formatting? A) Text (formatted, long) B) String (plain) C) Text (plain) D) Text (formatted) Answer: C Explanation: The “Text (plain)” field type stores unformatted plain text, unlike formatted fields that allow HTML. Question 12. When creating a new content type, which setting determines whether revisions are saved automatically?

Exam

A) “Display settings” B) “Publishing options” C) “Revision information” D) “Authoring information” Answer: C Explanation: The “Revision information” section includes a checkbox to create a new revision each time the content is saved. Question 13. Which Drupal entity reference field option allows linking to multiple taxonomy terms? A) “Reference type: Content” B) “Allowed number of values: Unlimited” C) “Target bundle: Taxonomy term” D) Both B and C Answer: D Explanation: Setting the target bundle to “Taxonomy term” and allowing unlimited values enables referencing multiple terms. Question 14. In Drupal Views, what does the “Contextual filter” provide? A) A way to sort results. B) A way to expose filters to site visitors. C) A dynamic filter whose value comes from the URL or other context. D) A relationship between two entities. Answer: C Explanation: Contextual filters accept values from the URL, arguments, or other contexts to filter the view dynamically.

Exam

Explanation: drush cex (alias for drush config-export) exports configuration to the sync directory. Question 18. To enable multilingual content, which core module must be installed first? A) Language B) Content Translation C) Interface Translation D) Configuration Translation Answer: A Explanation: The “Language” module provides language management; other translation modules depend on it. Question 19. In a Drupal theme’s .info.yml file, which key defines the base theme being extended? A) base theme: B) base_theme: C) extends: D) parent: Answer: B Explanation: The base_theme key specifies the theme that the custom theme inherits from. Question 20. Which Twig filter is used to translate a string in a template? A) |trans B) |t C) {% translate %} D) |gettext

Exam

Answer: B Explanation: The |t filter (or {% trans %} tag) marks a string for translation in Drupal Twig templates. Question 21. In Twig, how do you access the attributes object to add a CSS class to an element? A) {{ attributes.addClass('my-class') }} B) {{ element.addClass('my-class') }} C) {{ attributes.class('my-class') }} D) {{ addClass(attributes, 'my-class') }} Answer: A Explanation: The attributes object provides an addClass() method to append classes to the rendered HTML element. Question 22. Which function in a theme’s .theme file runs before a node is rendered? A) mytheme_preprocess_node() B) mytheme_node_preprocess() C) mytheme_process_node() D) mytheme_node_alter() Answer: A Explanation: hook_preprocess_node() (implemented as mytheme_preprocess_node()) modifies variables before the node template is rendered. Question 23. In a Drupal library definition, which key specifies the CSS files to be loaded? A) css: B) styles:

Exam

A) hook_node_insert() B) hook_node_presave() C) hook_node_update() D) hook_node_view() Answer: B Explanation: hook_node_presave() runs before a node is saved (both on insert and update), enabling modifications to the entity. Question 27. In Drupal 10, which file defines a custom route for a module? A) my_module.routing.yml B) my_module.routes.yml C) my_module.links.yml D) my_module.services.yml Answer: A Explanation: Routes are declared in MODULE_NAME.routing.yml. Question 28. Which class is typically extended to create a custom controller in Drupal? A) ControllerBase B) FormBase C) PluginBase D) EntityBase Answer: A Explanation: Controllers usually extend \Drupal\Core\Controller\ControllerBase to gain access to common services.

Exam

Question 29. How can you retrieve the current user service via dependency injection in a class? A) $this->currentUser = \Drupal::service('current_user'); B) Add current_user to the class constructor and store it as a property. C) Use \Drupal::currentUser(); directly. D) Both A and B are correct. Answer: D Explanation: Both direct service container access and proper dependency injection via the constructor are valid; injection is the recommended practice. Question 30. Which plugin type would you use to create a reusable block that can be placed via the Block Layout UI? A) Field plugin B) Block plugin C) Action plugin D) Queue worker plugin Answer: B Explanation: Block plugins implement \Drupal\Core\Block\BlockBase and appear in the Block Layout UI. Question 31. In the Form API, which property defines the form’s submit callback? A) #validate B) #submit C) #action D) #process Answer: B

Exam

D) Configuration entities are always translatable. Answer: B Explanation: Configuration entities store site configuration (e.g., Views, content types) and are exportable; content entities store data created by users (e.g., nodes, users). Question 35. Which PHP function is commonly used to log a message to the Drupal watchdog? A) watchdog() B) \Drupal::logger('my_module')->notice('Message'); C) drupal_set_message() D) log_error() Answer: B Explanation: The modern PSR‑3 logger is accessed via \Drupal::logger('channel'), allowing severity levels like notice, error, etc. Question 36. When debugging a custom module, which service provides the current request object? A) request_stack B) http_kernel C) router D) current_route_match Answer: A Explanation: The request_stack service holds the current Symfony Request object. Question 37. Which Cache API tag should be added to a render array that displays a list of nodes of type “article”?

Exam

A) node_list B) node:article C) node_list:article D) node_type:article Answer: B Explanation: Adding node:article as a cache tag ensures the render array is invalidated when any article node changes. Question 38. What does setting #cache => ['max-age' => 0] on a render array accomplish? A) Caches the output forever. B) Disables caching for that specific render array. C) Uses the default cache lifetime. D) Caches the output for one second. Answer: B Explanation: A max-age of 0 tells Drupal not to cache the render array at all. Question 39. Which function should you use to safely output a variable that may contain HTML in a Twig template? A) {{ variable|raw }} B) {{ variable|escape }} C) {{ variable }} (no filter) D) {{ variable|e }} Answer: D Explanation: In Twig, |e (or |escape) safely escapes HTML. Using |raw would bypass escaping and could lead to XSS.

Exam

Question 43. What is the purpose of the classy base theme? A) Provides a minimal, unstyled HTML skeleton. B) Supplies a set of useful Twig templates and CSS classes for developers to extend. C) Contains an admin UI theme. D) Implements a responsive grid system. Answer: B Explanation: classy offers a collection of reusable templates and CSS classes that theme developers can inherit. Question 44. Which Drupal core module provides a UI for creating and managing Views? A) Layout Builder B) Views UI C) Entity Reference D) Display Suite Answer: B Explanation: The Views UI module supplies the administrative interface for building and editing Views. Question 45. In Layout Builder, what is a “layout section”? A) A reusable block type. B) A row that can contain one or more columns. C) A custom field formatter. D) An entity reference. Answer: B

Exam

Explanation: A layout section defines a row in the layout, and within it you can add columns and place blocks. Question 46. Which hook is invoked after a block is rendered, allowing you to alter its render array? A) hook_block_view_alter() B) hook_block_preprocess() C) hook_block_build() D) hook_block_view() Answer: A Explanation: hook_block_view_alter() lets modules modify the block’s render array before it is sent to the theme layer. Question 47. Which Views filter type would you use to only display content that is published? A) “Content: Title” B) “Content: Status” C) “Content: Type” D) “Content: Author uid” Answer: B Explanation: The “Content: Status” filter lets you include or exclude unpublished content. Question 48. When exporting configuration, which command will also export the active configuration from the default site? A) drush cex B) drush cget

Exam

A) ContainerInjectionInterface B) ServiceProviderInterface C) No specific interface is required; any class can be a service. D) PluginInterface Answer: C Explanation: Drupal services can be any PHP class; they become services by being defined in services.yml. No mandatory interface. Question 52. What does the #attached property on a render array do? A) Sets the HTML id attribute. B) Attaches libraries (CSS/JS) and other assets to the rendered output. C) Defines cache tags. D) Specifies the theme hook. Answer: B Explanation: #attached allows you to attach libraries, settings, and other assets to the render array. Question 53. Which of the following is a recommended practice for preventing XSS in custom module output? A) Use \Drupal::service('renderer')->renderPlain() B) Output raw user input directly. C) Escape all variables with \Drupal\Component\Utility\Xss::filter() or Twig’s |escape. D) Disable the HTML filter module. Answer: C Explanation: Escaping user-provided data with XSS filters or Twig’s |escape prevents cross‑site scripting attacks.

Exam

Question 54. Which core module provides the “Content moderation” workflow feature? A) Workflows B) Moderation Sidebar C) Content Moderation D) Entity Workflow Answer: C Explanation: The “Content Moderation” module enables editorial workflows for content entities. Question 55. In a Drupal theme, where are region definitions declared? A) In theme_name.info.yml under the regions: key. B) In theme_name.libraries.yml. C) In theme_name.theme file. D) In theme_name.settings.yml. Answer: A Explanation: The regions: section of the .info.yml file lists all region names for the theme. Question 56. Which of the following is the correct syntax to add a CSS class to a block’s attributes in a Twig template? A) {{ attributes.addClass('my-block') }} B) {{ block.attributes.addClass('my-block') }} C) {{ attributes.class('my-block') }} D) {{ addClass(attributes, 'my-block') }} Answer: A