Repository navigation
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.
Maintained by Viames Marino — VM Ingegneria · Professional enquiries
Home · Setup · Configuration
Build with Pair 4
- Generator
- Controllers and responses
- Read models
- ActiveRecord and queries
- Forms and validation
- PairUI.js and HTML fragments
APIs and authentication
- API guide and CRUD
- Middleware and rate limits
- Users, sessions, and ACL
- Passkeys and social login
- Native mobile setup
Integrate and operate
- Integrations
- Runtime extensions and adapter keys
- Cache and cache stores
- Logs and observability
- PWA and push
- Packages and distribution
- Upgrade to v4