diff --git a/google_vision.install b/google_vision.install index 6cfdcdb..8cb5081 100755 --- a/google_vision.install +++ b/google_vision.install @@ -5,19 +5,21 @@ * Install, update and uninstall functions for the google_vision module. */ +use Drupal\Core\Url; + /** * Implements hook_requirements(). */ function google_vision_requirements($phase) { $requirements = array(); if ($phase == 'runtime') { - $key = \Drupal::service('config.factory')->get('google_vision.settings')->get('api_key'); + $key = \Drupal::config('google_vision.settings')->get('api_key'); if(!$key) { $requirements['google_vision'] = array( 'title' => t('API Key configuration'), 'severity' => REQUIREMENT_ERROR, 'description' => t('The API key is not set at /admin/config/media/google_vision. It is highly required to set the API Key at the configuration page.', array( - ':settings' => \Drupal::url('google_vision.settings'), + ':settings' => Url::fromRoute('google_vision.settings'), )), ); }