Completed
Push — for-qa-ezp-30690-too-early-cr-... ( 9061bc )
by
unknown
51:53 queued 15:49
created

LanguageResolver::getShowAllTranslations()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * File containing LanguageResolver class.
5
 *
6
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
7
 * @license For full copyright and license information view LICENSE file distributed with this source code.
8
 */
9
namespace eZ\Publish\Core\Repository\SiteAccessAware\Language;
10
11
/**
12
 * Resolves language settings for use in SiteAccess aware Repository.
13
 */
14
final class LanguageResolver extends AbstractLanguageResolver
15
{
16
    /**
17
     * Values typically provided by configuration.
18
     *
19
     * @var string[]
20
     */
21
    private $configLanguages;
22
23
    public function __construct(
24
        array $configLanguages,
25
        bool $defaultUseAlwaysAvailable = true,
26
        bool $defaultShowAllTranslations = false
27
    ) {
28
        $this->configLanguages = $configLanguages;
29
        parent::__construct($defaultUseAlwaysAvailable, $defaultShowAllTranslations);
30
    }
31
32
    protected function getConfiguredLanguages(): array
33
    {
34
        return $this->configLanguages;
35
    }
36
}
37