function locale_translation_project_list
Same name and namespace in other branches
- 10 core/modules/locale/locale.compare.inc \locale_translation_project_list()
- 11.x core/modules/locale/locale.compare.inc \locale_translation_project_list()
- 9 core/modules/locale/locale.compare.inc \locale_translation_project_list()
- 8.9.x core/modules/locale/locale.compare.inc \locale_translation_project_list()
Fetch an array of projects for translation update.
Return value
array Array of project data including .info.yml file data.
Deprecated
in drupal:11.4.0 and is removed from drupal:13.0.0. There is no replacement.
See also
https://www.drupal.org/node/3037033
1 string reference to 'locale_translation_project_list'
- drupal_static_reset in core/
includes/ bootstrap.inc - Resets one or all centrally stored static variable(s).
File
-
core/
modules/ locale/ locale.compare.inc, line 73
Code
function locale_translation_project_list() {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. There is no replacement. See https://www.drupal.org/node/3037033', E_USER_DEPRECATED);
$projects =& drupal_static(__FUNCTION__, []);
if (empty($projects)) {
$projects = [];
$additional_allow_list = [
'interface translation project',
'interface translation server pattern',
];
$module_data = _locale_translation_prepare_project_list(\Drupal::service('extension.list.module')->getList(), 'module');
$theme_data = _locale_translation_prepare_project_list(\Drupal::service('extension.list.theme')->reset()
->getList(), 'theme');
$project_info = new ProjectInfo();
$project_info->processInfoList($projects, $module_data, 'module', TRUE, $additional_allow_list);
$project_info->processInfoList($projects, $theme_data, 'theme', TRUE, $additional_allow_list);
// Allow other modules to alter projects before fetching and comparing.
\Drupal::moduleHandler()->alter('locale_translation_projects', $projects);
}
return $projects;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.