TYPO3 CMS  TYPO3_6-2
LanguageCommandController.php
Go to the documentation of this file.
1 <?php
3 
21 
26  protected $packageManager;
27 
33 
41  public function updateCommand($localesToUpdate = '') {
43  $updateTranslationService = $this->objectManager->get('TYPO3\\CMS\\Lang\Service\\UpdateTranslationService');
45  $languageRepository = $this->objectManager->get('TYPO3\\CMS\\Lang\\Domain\\Repository\\LanguageRepository');
46 
47  $locales = array();
48  if (!empty($localesToUpdate)) {
50  } else {
51  $languages = $languageRepository->findSelected();
52  foreach ($languages as $language) {
54  $locales[] = $language->getLocale();
55  }
56  }
57  $this->packageManager = $this->objectManager->get('TYPO3\\CMS\\Core\\Package\\PackageManager');
59  foreach ($this->packageManager->getAvailablePackages() as $package) {
60  $updateTranslationService->updateTranslation($package->getPackageKey(), $locales);
61  }
62  }
63 
67  protected function emitPackagesMayHaveChangedSignal() {
68  $this->signalSlotDispatcher->dispatch('PackageManagement', 'packagesMayHaveChanged');
69  }
70 }
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
$locales
Definition: be_users.php:6