Loading src/FotowebClient.php +8 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,6 @@ use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\media_fotoweb\OAuth2\Persistence\ApiTokenPersistence; use Drupal\media_fotoweb\OAuth2\Persistence\UserTokenPersistence; use kamermans\OAuth2\OAuth2Handler; use Psr\Container\ContainerInterface; /** * FotowebClient for configuration of client in fotoweb. Loading Loading @@ -103,6 +102,14 @@ class FotowebClient { } $configuration['persistenceProvider'] = $tokenPersistence; } // If we don't have a server yet we can't create a client. if (!$configuration['baseUrl']) { \Drupal::messenger()->addMessage( $this->t("Until a server is added we can't create the configuration."), 'warning' ); return; } $this->setConfiguration($configuration); $this->client = new FotowebAPIClient($configuration); } Loading Loading
src/FotowebClient.php +8 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,6 @@ use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\media_fotoweb\OAuth2\Persistence\ApiTokenPersistence; use Drupal\media_fotoweb\OAuth2\Persistence\UserTokenPersistence; use kamermans\OAuth2\OAuth2Handler; use Psr\Container\ContainerInterface; /** * FotowebClient for configuration of client in fotoweb. Loading Loading @@ -103,6 +102,14 @@ class FotowebClient { } $configuration['persistenceProvider'] = $tokenPersistence; } // If we don't have a server yet we can't create a client. if (!$configuration['baseUrl']) { \Drupal::messenger()->addMessage( $this->t("Until a server is added we can't create the configuration."), 'warning' ); return; } $this->setConfiguration($configuration); $this->client = new FotowebAPIClient($configuration); } Loading