loadCredentials()); } public function loadCredentials():array { return Auth::getInstance()->getCredentials($this->service_name, $this->userID); } protected function logError(string $method, string $message, array $context = []):void { $context['service'] = $this->service_name; JVB()->error()->log('['.self::class.']'.$method, $message, $context); } protected function getReturnURL():string { //If we are on the main admin page, we want to go back to our Integrations page on admin //If we are on the custom dashboard, we want to go back to that dashboard page return is_admin() ? admin_url('admin.php?page=jvb-integrations') : get_home_url(null, '/dash/integrations/'); } protected function determineOptionPage():string { return is_admin() ? admin_url('admin.php?page=jvb-integrations-'.$this->service_name) : get_home_url(null, '/dash/integrations/'.$this->service_name.'/'); } protected function outputIcon(string $icon):string { if (is_admin()) { $icons = IconsManager::for('admin'); return $icons->getRawSvg($icon); } return jvbDashIcon($icon); } }