Drupal Services Cheatsheet

Service Name Class (Core) Description
database Drupal\Core\Database\Connection Central entry for database queries & schema handling
entity_type.manager Drupal\Core\Entity\EntityTypeManagerInterface Manages entity types and their handlers
entity_type.bundle.info Drupal\Core\Entity\EntityTypeBundleInfo Provides bundle info (e.g. content types) for entity types
entity_type.storage.<type> Drupal\Core\Entity\Sql\SqlContentEntityStorage CRUD operations for each entity type (like node, user, taxonomy)
cache.default Drupal\Core\Cache\DatabaseBackend Default caching layer
cache_context.* Various CacheContext services Provide context-sensitive cache variation (e.g. user roles, route, language) (api.drupal.org, drupalatyourfingertips.com, axelerant.com, drupal.stackexchange.com, imagexmedia.com)
cache.dynamic_page_cache Drupal\Core\Cache\DynamicPageCacheCache Caches full page responses dynamically
cache.private Drupal\Core\Cache\NullBackend Private cache storage
renderer Drupal\Core\Render\Renderer Core of Drupal’s render pipeline (render arrays to HTML)
theme.manager Drupal\Core\Theme\ThemeManagerInterface Handles theme discovery and rendering
file_url_generator Drupal\Core\StreamWrapper\StreamWrapperManager Generates URLs for uploaded files
path_alias.manager Drupal\path_alias\AliasManager Handles URL alias generation and lookup
event_dispatcher Drupal\Core\EventDispatcher\ContainerAwareEventDispatcher Central service for subscribing & dispatching Symfony/Drupal events
logger.factory Drupal\Core\Logger\LoggerChannelFactory Provides PSR-3 logger channels
mail.manager Drupal\Core\Mail\MailManagerInterface Handles outgoing emails
plugin.manager.* Varies by plugin type (e.g. block, formatter, field, etc.) Discovers and loads plugin plugins
router.builder Drupal\Core\Routing\RouteBuilder Builds and rebuilds the main routing table
current_user Drupal\Core\Session\AccountProxyInterface Provides current user context
session_manager Drupal\Core\Session\SessionManager Starts and manages sessions
path.validator Drupal\Core\Path\CurrentPathStack Validates URLs, redirects, and path rewriting
lock Drupal\Core\Lock\LockBackendInterface Manages locks for concurrency control
messenger Drupal\Core\Messenger\MessengerInterface Handles user-facing messages (status, error, info)
translation.manager Drupal\Core\StringTranslation\TranslationManager Manages interface translations
config.factory Drupal\Core\Config\ConfigFactoryInterface Reads and writes immutable YAML config
keyvalue Drupal\Core\KeyValueStore\KeyValueExpirableFactory Generic key/value storage for various data