jsonapi.install
Same filename and directory in other branches
Module install file.
File
-
core/
modules/ jsonapi/ jsonapi.install
View source
<?php
/**
* @file
* Module install file.
*/
/**
* Implements hook_install().
*/
function jsonapi_install() : void {
$module_handler = \Drupal::moduleHandler();
$potential_conflicts = [
'content_translation',
'config_translation',
'language',
];
$should_warn = array_reduce($potential_conflicts, function ($should_warn, $module_name) use ($module_handler) {
return $should_warn ?: $module_handler->moduleExists($module_name);
}, FALSE);
if ($should_warn) {
\Drupal::messenger()->addWarning(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',
]));
}
}
/**
* Implements hook_update_last_removed().
*/
function jsonapi_update_last_removed() : int {
return 9401;
}
Functions
Title | Deprecated | Summary |
---|---|---|
jsonapi_install | Implements hook_install(). | |
jsonapi_update_last_removed | Implements hook_update_last_removed(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.