Acquia Certified Back End Specialist
D10
Acquia Certified Back End Specialist - Drupal 10
www.certqueen.com
Exam overview
Associate certification Acquia Certified Back End Specialist - Drupal 10
Samples 16 Q&As
This sample introduces Acquia Certified Back End Specialist - Drupal 10 and provides focused practice for the Acquia
Certified Back End Specialist D10 exam.
Save 40% on Full Acquia Certified Back End Specialist - Drupal 10 Exam Questions with Coupon "40PASS".
o m
Practice questions
n .c
e e
1. (Service Definition & YAML Syntax) Scenario: You are defining a custom data synchronization service in
q u
my_module.services.yml. The service constructor requires the core config.factory and logger.factory services
r t
as arguments. What is the correct YAML syntax to pass these services?
Choose one answer. .c e
A services:
w w
B services:
w
C services:
D services:
2. (Event Subscriber Registration) Scenario: You have written a class RedirectSubscriber that correctly
implements EventSubscriberInterface to intercept Symfony kernel request events. However, the logic is never
executed during a page load. Your my_module.services.yml looks like this: services:
my_module.redirect_subscriber: class: Drupal\my_module\EventSubscriber\RedirectSubscriber What critical
metadata is missing from the service definition to ensure Drupal registers it as an active event subscriber?
Choose one answer.
A autowire: true
B tags: [{ name: event_subscriber }]
C type: subscriber
D events: ['kernel.request']
www.certqueen.com Page 1
, Acquia Certified Back End Specialist D10 www.certqueen.com
3. (Cache Contexts - Role Variation) Scenario: A custom controller returns a render array for a reporting
dashboard. The content displayed in this dashboard differs strictly depending on whether the current user is
an anonymous visitor, a standard authenticated user, or an administrator. Which cache configuration MUST be
added to the render array so the page is cached correctly without accidentally serving administrator-only
content to anonymous users?
Choose one answer.
A '#cache' => ['contexts' => ['user']]
B '#cache' => ['contexts' => ['user.roles']]
C '#cache' => ['tags' => ['user_roles']]
D '#cache' => ['max-age' => 0]
4. (Cache Tags - List Invalidation) Scenario: You built a custom block rendering a grid of the 5 most recently
updated 'News' nodes. Which cache configuration must you add to the render array so the block's cache
automatically invalidates and refreshes whenever ANY 'News' node is created, updated, or deleted on the site?
Choose one answer.
A '#cache' => ['contexts' => ['node']]
B '#cache' => ['tags' => ['node_list']]
C '#cache' => ['tags' => ['node:news']]
o m
D '#cache' => ['tags' => ['node']]
n .c
e e
u
tq directly in the database. Which implementation
5. (Security - Database API Injection Prevention) Scenario: You are writing a custom Drush command that
updates user points based on a submitted variabler$type
. ce using Drupal 10's Database Connection service?
correctly prevents SQL injection vulnerabilities when
Choose one answer.
w w
A type); w
B $connection->query("UPDATE {user_points} SET points = points + 10 WHERE type = '{$type}'");
C type]);
D type);
6. (Events vs Hooks - Modifying HTTP Headers) Scenario: The security team requires that a custom HTTP
header (X-Acme-Security-Policy: strict) be attached to the HTTP Response of every single page request served
by Drupal. What is the correct modern mechanism to alter the HTTP response and append this header before it
is dispatched to the browser?
Choose one answer.
A Implement hook_page_attachments_alter() in the .module file.
B Create an Event Subscriber that listens to the KernelEvents::RESPONSE event.
C Implement hook_exit() to modify the PHP header() function directly.
D Add the header definition to the module's my_module.info.yml file.
www.certqueen.com Page 2
D10
Acquia Certified Back End Specialist - Drupal 10
www.certqueen.com
Exam overview
Associate certification Acquia Certified Back End Specialist - Drupal 10
Samples 16 Q&As
This sample introduces Acquia Certified Back End Specialist - Drupal 10 and provides focused practice for the Acquia
Certified Back End Specialist D10 exam.
Save 40% on Full Acquia Certified Back End Specialist - Drupal 10 Exam Questions with Coupon "40PASS".
o m
Practice questions
n .c
e e
1. (Service Definition & YAML Syntax) Scenario: You are defining a custom data synchronization service in
q u
my_module.services.yml. The service constructor requires the core config.factory and logger.factory services
r t
as arguments. What is the correct YAML syntax to pass these services?
Choose one answer. .c e
A services:
w w
B services:
w
C services:
D services:
2. (Event Subscriber Registration) Scenario: You have written a class RedirectSubscriber that correctly
implements EventSubscriberInterface to intercept Symfony kernel request events. However, the logic is never
executed during a page load. Your my_module.services.yml looks like this: services:
my_module.redirect_subscriber: class: Drupal\my_module\EventSubscriber\RedirectSubscriber What critical
metadata is missing from the service definition to ensure Drupal registers it as an active event subscriber?
Choose one answer.
A autowire: true
B tags: [{ name: event_subscriber }]
C type: subscriber
D events: ['kernel.request']
www.certqueen.com Page 1
, Acquia Certified Back End Specialist D10 www.certqueen.com
3. (Cache Contexts - Role Variation) Scenario: A custom controller returns a render array for a reporting
dashboard. The content displayed in this dashboard differs strictly depending on whether the current user is
an anonymous visitor, a standard authenticated user, or an administrator. Which cache configuration MUST be
added to the render array so the page is cached correctly without accidentally serving administrator-only
content to anonymous users?
Choose one answer.
A '#cache' => ['contexts' => ['user']]
B '#cache' => ['contexts' => ['user.roles']]
C '#cache' => ['tags' => ['user_roles']]
D '#cache' => ['max-age' => 0]
4. (Cache Tags - List Invalidation) Scenario: You built a custom block rendering a grid of the 5 most recently
updated 'News' nodes. Which cache configuration must you add to the render array so the block's cache
automatically invalidates and refreshes whenever ANY 'News' node is created, updated, or deleted on the site?
Choose one answer.
A '#cache' => ['contexts' => ['node']]
B '#cache' => ['tags' => ['node_list']]
C '#cache' => ['tags' => ['node:news']]
o m
D '#cache' => ['tags' => ['node']]
n .c
e e
u
tq directly in the database. Which implementation
5. (Security - Database API Injection Prevention) Scenario: You are writing a custom Drush command that
updates user points based on a submitted variabler$type
. ce using Drupal 10's Database Connection service?
correctly prevents SQL injection vulnerabilities when
Choose one answer.
w w
A type); w
B $connection->query("UPDATE {user_points} SET points = points + 10 WHERE type = '{$type}'");
C type]);
D type);
6. (Events vs Hooks - Modifying HTTP Headers) Scenario: The security team requires that a custom HTTP
header (X-Acme-Security-Policy: strict) be attached to the HTTP Response of every single page request served
by Drupal. What is the correct modern mechanism to alter the HTTP response and append this header before it
is dispatched to the browser?
Choose one answer.
A Implement hook_page_attachments_alter() in the .module file.
B Create an Event Subscriber that listens to the KernelEvents::RESPONSE event.
C Implement hook_exit() to modify the PHP header() function directly.
D Add the header definition to the module's my_module.info.yml file.
www.certqueen.com Page 2