Core Services
Pubvana exposes a set of services in app/Services/ that extension developers can consume via CI4's service() helper. These services own the major subsystems — themes, widgets, plugins, marketplace, SEO, media, and activity logging.
Accessing Services
Use CI4's service locator:
$theme = service('theme');
$widgets = service('widgets');
$seo = service('seo');
$media = service('media');
PluginManager uses its own singleton pattern:
$pm = AppServicesPluginManager::instance();
ActivityLogger is a static class — no service() call needed:
AppServicesActivityLogger::log('post.created', 'post', $postId, 'Post created');
Services Overview
| Service | Class | Key Responsibility |
|---|---|---|
theme | ThemeService | Active theme, discover, sync, render views |
widgets | WidgetService | Discover, sync, render widget areas |
widgetData | WidgetDataService | Resolve data providers for widget instances |
plugins | PluginManager | Boot, discover, activate, deactivate plugins |
marketplace | MarketplaceService | Fetch catalogue, install extensions |
seo | SeoService | Build meta arrays and JSON-LD for entities |
media | MediaService | Upload and store media files |
ActivityLogger | (static) | Write audit records to activity_logs |
Subsections
Each service is documented in full in the subsections below.