Acquia Back End Specialist (D10) cheat sheet
Acquia Back End Specialist (D10) · Keep the key ideas within reach.
Drupal 10 Back End Development
Render arrays are built from #theme/#type elements and converted to HTML by the renderer; cacheability metadata (cache tags, contexts, max-age) propagates upward from children to parents.
A service is registered in a module's mymodule.services.yml; class autoloading requires the PSR-4 namespace declared in mymodule.info.yml and a Drupal\mymodule\ namespace matching the module directory.
The plugin system uses annotations (or PHP attributes in D10) read by the plugin manager; PluginBase subclasses declare @Plugin with id, and derivative plugins are produced by a DerivativeBase class.
hook_entity_type_alter() modifies entity type definitions; hook_form_alter() and hook_form_FORM_ID_alter() target forms, with $form_state passed by reference and #submit/#validate handlers appended as callables.
The database abstraction layer uses Drupal\Core\Database\Database::getConnection() and the query builders (select, insert, update, delete, merge); static queries use db_select-style builders, dynamic ones use injected Connection services.
Configuration is stored in the config system via \Drupal::configFactory()->getEditable('mymodule.settings'); schema is declared in config/schema/mymodule.schema.yml and validated against it.
Twig templates use {{ variable }}, {% if %}, and {{ content.field_name }}; the |t filter translates strings, and preprocess functions (mymodule_preprocess_node) populate template variables.
The entity API defines content entities via annotation/attribute with base fields and bundle fields; field storage is separate from field instance, and hook_entity_bundle_field_info_alter() adjusts bundle fields.
Dependency injection in controllers uses the create() static method and ContainerInterface; plugins receive services via create() in the plugin class or via the plugin manager's constructor.
Acquia Platform and Hosting
Acquia Cloud environments are Dev, Stage, and Prod; each environment has its own database, code branch, and domain, and code moves via git branches or the Cloud API.
The Acquia Cloud API (api.acquia.com) authenticates with OAuth2 or API tokens; endpoints manage applications, environments, databases, and backups.
Acquia Cloud IDE (Cloud IDE) provides a containerized development environment with the codebase, database, and services; it is distinct from local Lando/DDEV setups.
Acquia Cloud Hooks (cloud-hooks) live in the hooks/ directory of the repository and run on deployment events such as post-code-deploy, post-db-copy, and post-site-install.
Acquia Cloud Platform uses a git-based workflow: pushing to a branch triggers a build, and deployment to an environment is a separate step via the UI or API.
Acquia Cloud Site Factory is a multi-site management product; it uses a factory model with site groups and staged deployments, distinct from single-site Cloud Platform.
Acquia Cloud Edge provides CDN and WAF (web application firewall) services; Edge CDN caches static assets and Varnish handles Drupal page caching at the platform layer.
Acquia Cloud Platform's database backups are taken automatically and can be restored to any environment; drush sql-dump and sql-sync are common migration tools between environments.
Acquia's environment variables (e.g., AH_SITE_ENVIRONMENT) identify the current environment and are used in settings.php to configure database and cache backends per environment.
Drupal 10 Back End Development (Performance & Security focus)
Cache contexts (e.g., user.roles, url.path) vary cached render arrays; cache tags (node:1, config:system.site) invalidate them; max-age sets TTL and 0 means uncacheable.
The Dynamic Page Cache caches pages per cache context and is bypassed for authenticated users only when contexts differ; the Internal Page Cache serves anonymous users.
BigPipe streams placeholders to the browser, improving perceived performance for uncacheable content; it requires the big_pipe module and works with render placeholders.
Twig autoescaping is on by default; use |raw only for trusted markup, and use Xss::filter() or the |t filter with placeholders for safe output.
The Form API uses #access and #element_validate for access control; CSRF protection is automatic on forms via form tokens, and JSON:API requires the jsonapi.settings and proper permissions.
The database API uses prepared statements and placeholders (:name) to prevent SQL injection; never concatenate user input into query strings.
Drupal's permission system gates routes via _permission requirements in routing.yml; access checks use AccessResult objects with cacheability metadata.
The render cache and the page cache are distinct layers; disabling cache for a block via #cache max-age 0 affects only that element's cacheability.
Performance tuning includes enabling the Internal Page Cache, Dynamic Page Cache, and BigPipe, plus configuring Redis or Memcache for the cache backend in settings.php.
Acquia Platform and Hosting (Deployment & Tooling focus)
Acquia CLI (acli) is the command-line tool for interacting with Acquia Cloud; it authenticates via API tokens and can run drush, pull databases, and manage environments.
Cloud Hooks are PHP scripts named after events (e.g., post-code-deploy.php) placed in the hooks/ directory; they run in the environment and can execute drush commands.
The Acquia Cloud API uses OAuth2 with client credentials; tokens are scoped to applications and expire, and requests are made to https://api.acquia.com.
Deployment workflow: commit to a branch, push to Acquia's git remote, then deploy the branch to an environment; database and files are not moved by code deployment.
Acquia Cloud Platform's settings.php includes a database credential section that reads AH_SITE_ENVIRONMENT and AH_SITE_GROUP to select the correct database per environment.
Acquia Cloud IDE provides a browser-based VS Code environment with the codebase and a database; it supports drush and composer and connects to Cloud Platform via API tokens.
Acquia Cloud Edge CDN caches static assets at edge locations; cache purging is done via the Cloud API or the Acquia Purge module, and Varnish handles dynamic page caching.
Acquia Cloud Platform supports multiple environments (Dev, Stage, Prod) with separate databases; copying databases between environments is done via the UI or
acli(pull/push).Acquia's Cloud Hooks run on events including post-code-deploy, post-code-update, post-db-copy, post-files-copy, and post-site-install; failures can block deployment.