User Docs Developer Docs | |

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

ServiceClassKey Responsibility
themeThemeServiceActive theme, discover, sync, render views
widgetsWidgetServiceDiscover, sync, render widget areas
widgetDataWidgetDataServiceResolve data providers for widget instances
pluginsPluginManagerBoot, discover, activate, deactivate plugins
marketplaceMarketplaceServiceFetch catalogue, install extensions
seoSeoServiceBuild meta arrays and JSON-LD for entities
mediaMediaServiceUpload and store media files
ActivityLogger(static)Write audit records to activity_logs

Subsections

Each service is documented in full in the subsections below.