|
1
|
|
|
<?php |
|
2
|
|
|
namespace EWW\Dpf\Domain\Repository; |
|
3
|
|
|
|
|
4
|
|
|
/* |
|
5
|
|
|
* This file is part of the TYPO3 CMS project. |
|
6
|
|
|
* |
|
7
|
|
|
* It is free software; you can redistribute it and/or modify it under |
|
8
|
|
|
* the terms of the GNU General Public License, either version 2 |
|
9
|
|
|
* of the License, or any later version. |
|
10
|
|
|
* |
|
11
|
|
|
* For the full copyright and license information, please read the |
|
12
|
|
|
* LICENSE.txt file that was distributed with this source code. |
|
13
|
|
|
* |
|
14
|
|
|
* The TYPO3 project - inspiring people to share! |
|
15
|
|
|
*/ |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* The repository for SysLanguage |
|
19
|
|
|
*/ |
|
20
|
|
|
class SysLanguageRepository extends \TYPO3\CMS\Extbase\Persistence\Repository |
|
|
|
|
|
|
21
|
|
|
{ |
|
22
|
|
|
|
|
23
|
|
|
/** |
|
24
|
|
|
* Finds all installed languages of the TYPO3 system (usually on pid 0). |
|
25
|
|
|
* |
|
26
|
|
|
* @return \EWW\Dpf\Domain\Model\SysLanguage | NULL |
|
27
|
|
|
*/ |
|
28
|
|
|
public function findInstalledLanguages() |
|
29
|
|
|
{ |
|
30
|
|
|
$result = $this->createQuery(); |
|
31
|
|
|
$result->getQuerySettings()->setRespectStoragePage(false); |
|
32
|
|
|
$result->getQuerySettings()->setReturnRawQueryResult(true); |
|
33
|
|
|
$result->statement('SELECT l.uid,l.pid,l.title,l.flag,i.lg_iso_2 FROM sys_language as l LEFT JOIN static_languages as i ON i.uid = l.static_lang_isocode'); |
|
34
|
|
|
|
|
35
|
|
|
if ($result->execute()) { |
|
36
|
|
|
foreach ($result->execute() as $language) { |
|
37
|
|
|
$sysLanguage = new \EWW\Dpf\Domain\Model\SysLanguage(); |
|
38
|
|
|
$sysLanguage->setUid($language['uid']); |
|
39
|
|
|
$sysLanguage->setPid($language['pid']); |
|
40
|
|
|
$sysLanguage->setTitle($language['title']); |
|
41
|
|
|
$sysLanguage->setFlag($language['flag']); |
|
42
|
|
|
$sysLanguage->setLangIsocode(strtolower($language['lg_iso_2'])); |
|
43
|
|
|
|
|
44
|
|
|
$sysLanguages[] = $sysLanguage; |
|
45
|
|
|
} |
|
46
|
|
|
return $sysLanguages; |
|
|
|
|
|
|
47
|
|
|
} |
|
48
|
|
|
|
|
49
|
|
|
return null; |
|
50
|
|
|
} |
|
51
|
|
|
|
|
52
|
|
|
} |
|
53
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths