From 52733beffd7f1c48012b371d4ad8e7d937afd924 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 01 Jan 2026 23:21:25 +0000
Subject: [PATCH] Merge branch 'main' of https://github.com/jakevdwerf/jvb
---
JVBase.php | 34 ++++++++++++++++++++++++++--------
1 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/JVBase.php b/JVBase.php
index 45fc12e..0b63b08 100644
--- a/JVBase.php
+++ b/JVBase.php
@@ -1,13 +1,16 @@
<?php
namespace JVBase;
+use JVBase\blocks\CustomBlocks;
use JVBase\integrations\BlueSky;
+use JVBase\managers\CacheManager;
use JVBase\managers\EmailManager;
use JVBase\managers\ErrorHandler;
use JVBase\managers\LoginManager;
use JVBase\managers\MagicLinkManager;
use JVBase\managers\OperationQueue;
use JVBase\managers\DashboardManager;
+use JVBase\managers\DirectoryManager;
use JVBase\managers\ReferralManager;
use JVBase\managers\RoleManager;
//use JVBase\managers\SchemaManager;
@@ -56,6 +59,7 @@
protected array $integrations = [];
protected array $blocks = [];
protected array $routes = [];
+ protected CustomBlocks $customBlocks;
protected array $serviceMap = [
'maps' => 'JVBase\integrations\GoogleMaps',
@@ -81,6 +85,7 @@
public function __construct()
{
+ $this->customBlocks = new CustomBlocks();
$this->managers = [
'errors' => new ErrorHandler(),
'queue' => new OperationQueue(),
@@ -133,6 +138,10 @@
$this->routes['term'] = new TermRoutes();
}
+ if (Features::forSite()->has('is_directory')) {
+ $this->managers['directory'] = new DirectoryManager();
+ }
+
if (jvbSiteHasDashboard()) {
$this->routes['error'] = new ErrorRoutes();
@@ -193,11 +202,15 @@
{
return array_merge(array_keys($this->content), array_keys($this->taxonomies));
}
- public function dashboard()
+ public function dashboard():DashboardManager|false
{
- return $this->managers['dash'];
+ return $this->managers['dash']??false;
}
- public function error()
+ public function directories():DirectoryManager|false
+ {
+ return $this->managers['directory']??false;
+ }
+ public function error():ErrorHandler
{
return $this->managers['errors'];
}
@@ -205,11 +218,11 @@
{
return $this->managers['file'];
}
- public function cache()
+ public function cache():CacheManager
{
return $this->managers['cache'];
}
- public function queue()
+ public function queue():OperationQueue
{
return $this->managers['queue'];
}
@@ -217,9 +230,9 @@
// {
// return $this->managers['forms'];
// }
- public function notification()
+ public function notification():NotificationManager|false
{
- return $this->managers['notifications'];
+ return $this->managers['notifications']??false;
}
public function routes($route):mixed
{
@@ -228,7 +241,7 @@
}
return false;
}
- public function roles()
+ public function roles():RoleManager
{
return $this->managers['roles'];
}
@@ -333,4 +346,9 @@
<?php
}
}
+
+ public function blocks():CustomBlocks|bool
+ {
+ return $this->customBlocks??false;
+ }
}
--
Gitblit v1.10.0