-
Notifications
You must be signed in to change notification settings - Fork 2
Template
Viames Marino edited this page Feb 26, 2026
·
2 revisions
Pair\Models\Template manages installed application templates/themes as plugins.
getDefault(): ?TemplategetPluginByName(string $name): ?TemplategetPath()getBaseFolder(): stringgetStyleFile(string $styleName): stringgetPlugin(): PluginpluginExists(string $name): boolsetBase(string $templateName): voidstoreByPlugin(SimpleXMLElement $options): bool
Lifecycle hook:
-
beforeDelete()removes template plugin folder.
$template = \Pair\Models\Template::getDefault();
$styleFile = $template->getStyleFile('default');
\Pair\Html\TemplateRenderer::parse($styleFile);Switch base template for derived template:
$template->setBase('default');See also: TemplateRenderer, Plugin, Application.