ThemeProvider
Magento\Theme\Model\Theme\ThemeProvider
What it does
This class provides centralized access to theme data in Magento 2, handling theme retrieval by full path or ID with caching support.
Developers use it to load theme objects programmatically, get theme customizations, and access virtual themes without directly querying the database.
It implements performance optimizations through caching and fallback mechanisms when the database is unavailable.
Public Methods
- getThemeByFullPath()
- getThemeCustomizations()
- getThemeById()
- _resetState()