function JsonapiHooks::modulesInstalled

Implements hook_modules_installed().

Attributes

#[Hook('modules_installed')]

File

core/modules/jsonapi/src/Hook/JsonapiHooks.php, line 52

Class

JsonapiHooks
Hook implementations for jsonapi.

Namespace

Drupal\jsonapi\Hook

Code

public function modulesInstalled($modules) : void {
  $potential_conflicts = [
    'content_translation',
    'config_translation',
    'language',
  ];
  if (!empty(array_intersect($modules, $potential_conflicts))) {
    \Drupal::messenger()->addWarning($this->t('Some multilingual features currently do not work well with JSON:API. See the <a href=":jsonapi-docs">JSON:API multilingual support documentation</a> for more information on the current status of multilingual support.', [
      ':jsonapi-docs' => 'https://www.drupal.org/docs/8/modules/jsonapi/translations',
    ]));
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.