| | |
| | | use JVBase\managers\ReferralManager; |
| | | use JVBase\managers\RoleManager; |
| | | //use JVBase\managers\SchemaManager; |
| | | use JVBase\managers\SEO\render\SchemaOutput; |
| | | use JVBase\managers\SEO\SchemaOutputManager; |
| | | use JVBase\managers\SEO\SEOAdminPage; |
| | | use JVBase\admin\SEOAdmin; |
| | | use JVBase\managers\AdminPages; |
| | | use JVBase\managers\NotificationManager; |
| | | use JVBase\managers\UserTermsManager; |
| | | use JVBase\registrar\Registrar; |
| | | use JVBase\rest\routes\FeedRoutes; |
| | | use JVBase\rest\routes\FavouritesRoutes; |
| | | use JVBase\rest\routes\IntegrationsSquareRoutes; |
| | | use JVBase\rest\routes\IntegrationsHelcimRoutes; |
| | | use JVBase\rest\routes\NotificationsRoutes; |
| | | use JVBase\rest\routes\ContentRoutes; |
| | | use JVBase\rest\routes\TermRoutes; |
| | |
| | | //use JVBase\rest\routes\BioRoutes; |
| | | use JVBase\rest\routes\SettingsRoutes; |
| | | //use JVBase\rest\routes\ShopRoutes; |
| | | use JVBase\rest\routes\ContentTermsRoutes; |
| | | use JVBase\rest\routes\SEORoutes; |
| | | use JVBase\rest\routes\QueueRoutes; |
| | | use JVBase\rest\routes\ErrorRoutes; |
| | |
| | | use JVBase\rest\routes\VoteRoutes; |
| | | use JVBase\rest\routes\Invitations; |
| | | use JVBase\rest\routes\ApprovalRoutes; |
| | | //use JVBase\rest\routes\AdminRoutes; |
| | | use JVBase\rest\routes\AdminRoutes; |
| | | use JVBase\rest\routes\IntegrationsRoutes; |
| | | use JVBase\utility\Features; |
| | | use JVBase\base\SchemaHelper; |
| | | |
| | | if (!defined('ABSPATH')) { |
| | | exit; |
| | |
| | | { |
| | | $this->customBlocks = new CustomBlocks(); |
| | | $this->managers = [ |
| | | 'errors' => new ErrorHandler(), |
| | | 'queue' => new Queue(), |
| | | // 'dash' => new DashboardManager(), |
| | | 'roles' => new RoleManager(), |
| | | // 'forms' => new FormManager(), |
| | | 'schema' => new SchemaOutputManager(), |
| | | 'admin' => new AdminPages(), |
| | | 'seoAdmin' => new SEOAdminPage(), |
| | | // 'uploads' => new UploadManager(), |
| | | 'errors' => new ErrorHandler(), |
| | | 'queue' => new Queue(), |
| | | // 'dash' => new DashboardManager(), |
| | | 'roles' => new RoleManager(), |
| | | // 'forms' => new FormManager(), |
| | | // 'schema' => new SchemaOutputManager(), |
| | | 'admin' => new AdminPages(), |
| | | 'seoAdmin' => new SEOAdmin(), |
| | | 'seo' => new SchemaOutput(), |
| | | 'schemaHelper' => new SchemaHelper(), |
| | | // 'uploads' => new UploadManager(), |
| | | 'userTerms' => new UserTermsManager(), |
| | | 'email' => new EmailManager(), |
| | | 'email' => new EmailManager(), |
| | | ]; |
| | | |
| | | $this->routes = [ |
| | |
| | | if (Features::hasIntegration('square')) { |
| | | $this->routes['square'] = new IntegrationsSquareRoutes(); |
| | | } |
| | | if (Features::hasIntegration('helcim')) { |
| | | $this->routes['helcim'] = new IntegrationsHelcimRoutes(); |
| | | } |
| | | |
| | | if (Features::forSite()->has('feed_block')) { |
| | | $this->routes['feed'] = new FeedRoutes(); |
| | | } |
| | | if (jvbSiteHasNotifications()) { |
| | | if (Features::forMembership()->has('notifications')) { |
| | | $this->managers['notifications'] = new NotificationManager(); |
| | | $this->routes['notifications'] = new NotificationsRoutes(); |
| | | } |
| | | if (Features::forSite()->has('feed_block') || jvbSiteHasDashboard()) { |
| | | if (Features::forSite()->has('feed_block') || Features::forSite()->has('dashboard')) { |
| | | $this->routes['term'] = new TermRoutes(); |
| | | } |
| | | |
| | |
| | | $this->managers['directory'] = new DirectoryManager(); |
| | | } |
| | | |
| | | if (jvbSiteHasDashboard()) { |
| | | if (Features::forSite()->has('dashboard')) { |
| | | $this->routes['error'] = new ErrorRoutes(); |
| | | // $this->routes['admin'] = new AdminRoutes(); |
| | | $this->routes['admin'] = new AdminRoutes(); |
| | | $this->routes['content'] = new ContentRoutes(); |
| | | // $this->routes['bio'] = new BioRoutes(); |
| | | // $this->routes['shop'] = new ShopRoutes(); |
| | | $this->routes['contentTax'] = new ContentTermsRoutes(); |
| | | $this->routes['options'] = new OptionsRoutes(); |
| | | } |
| | | |
| | | if (jvbSiteHasFavourites()) { |
| | | if (Features::forSite()->has('favourites')) { |
| | | $this->routes['favourites'] = new FavouritesRoutes(); |
| | | } |
| | | |
| | |
| | | if (Features::forMembership()->has('invitable')) { |
| | | $this->managers['invitations'] = new InvitationsManager(); |
| | | } |
| | | if (Features::anyContentHas('response') || Features::anyTaxonomyHas('response') || Features::anyUserHas('response')) { |
| | | if (!empty(Registrar::getFeatured('has_responses'))) { |
| | | $this->routes['comments'] = new ResponseRoutes(); |
| | | } |
| | | if (Features::anyContentHas('karma') || Features::anyTaxonomyHas('karma') || Features::anyUserHas('karma')) { |
| | | if (!empty(Registrar::getFeatured('karma'))) { |
| | | $this->routes['vote'] = new VoteRoutes(); |
| | | } |
| | | if (Features::anyContentHas('karma') || Features::anyTaxonomyHas('karma') || Features::anyUserHas('karma') |
| | | if (!empty(Registrar::getFeatured('karma')) |
| | | || Features::forMembership()->has('member_verified') || |
| | | Features::forMembership()->has('term_approval')) { |
| | | $this->routes['approvals'] = new ApprovalRoutes(); |
| | |
| | | |
| | | public function getFields($type): array |
| | | { |
| | | $content = JVB_CONTENT[$type] ?? JVB_TAXONOMY[$type] ?? JVB_USER[$type] ?? []; |
| | | return $content['fields'] ?? []; |
| | | return Registrar::getFieldsFor($type)??[]; |
| | | } |
| | | |
| | | public function getContent($type): mixed |
| | |
| | | } |
| | | } |
| | | |
| | | public function seo():SchemaOutput |
| | | { |
| | | return $this->managers['seo']; |
| | | } |
| | | |
| | | public function blocks():CustomBlocks|bool |
| | | { |
| | | return $this->customBlocks??false; |
| | | } |
| | | public function schemaHelper():SchemaHelper |
| | | { |
| | | return $this->managers['schemaHelper']; |
| | | } |
| | | } |