-
Notifications
You must be signed in to change notification settings - Fork 2
Template
Viames Marino edited this page Apr 23, 2026
·
3 revisions
Pair\Models\Template manages installed application templates/themes as package records.
getDefault(): ?TemplategetByName(string $name): ?TemplategetPath()getPackageBaseFolder(): stringgetStyleFile(string $styleName): stringgetInstallablePackage(): InstallablePackagepackageRecordExists(string $name): boolsetBase(string $templateName): voidstoreFromPackageManifest(SimpleXMLElement $options): bool
Lifecycle hook:
-
beforeDelete()removes the template package 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, InstallablePackage, Application.