| | |
| | | namespace JVBase\rest\routes; |
| | | |
| | | use JVBase\Instance; |
| | | use JVBase\managers\Cache; |
| | | use JVBase\managers\InvitationsManager; |
| | | use JVBase\managers\Roles; |
| | | use JVBase\rest\Rest; |
| | | use JVBase\managers\CustomTable; |
| | | use JVBase\rest\Route; |
| | |
| | | use Instance; |
| | | protected array $inviteConfig; |
| | | protected CustomTable $table; |
| | | |
| | | protected Cache $termCache; |
| | | public function __construct() |
| | | { |
| | | $this->cacheName = 'invitations'; |
| | | parent::__construct(); |
| | | $this->cache = Cache::for('invitations_posts','post'); |
| | | $this->termCache = Cache::for('invitation_terms', 'term'); |
| | | |
| | | // Get invitation configuration |
| | | $this->inviteConfig = InvitationsManager::getInstance()->getInviteConfig(); |
| | | $this->table = CustomTable::for('invitations'); |
| | | |
| | | // Cache connections |
| | | $this->cache |
| | | ->connect('user') |
| | | ->connect('taxonomy'); |
| | | } |
| | | |
| | | public function registerRoutes(): void |
| | |
| | | } |
| | | |
| | | $args = [ |
| | | 'user' => $userID, |
| | | 'id' => $userID, |
| | | 'to_term' => $termID, |
| | | 'taxonomy' => $taxonomy ? jvbNoBase($taxonomy) : null, |
| | | 'status' => $request->get_param('status'), |