| | |
| | | break; |
| | | case 'user': |
| | | $this->addUserFields(); |
| | | if ($registrar->hasAnyIntegrations()) { |
| | | $this->addIntegrationSetupField(); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | |
| | | { |
| | | return (new self())->defaultUserFields(); |
| | | } |
| | | |
| | | protected function addIntegrationSetupField():void |
| | | { |
| | | $integrations = $this->registrar->getIntegrations(); |
| | | foreach (array_keys($integrations) as $integration) { |
| | | $this->addField('integration_'.$integration.'_connected', [ |
| | | 'type' => 'true_false', |
| | | 'hidden' => true, |
| | | 'label' => 'Connected to '.$integration, |
| | | 'default' => false, |
| | | ]); |
| | | } |
| | | } |
| | | } |