Completed
Push — develop ( a0b39d...6e6eeb )
by Tino
07:33
created

TitleConfigurator::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Copyright (c) by the ACP3 Developers.
5
 * See the LICENSE file at the top-level module directory for licensing details.
6
 */
7
8
namespace ACP3\Modules\ACP3\System\Core\Breadcrumb;
9
10
use ACP3\Core\Settings\SettingsInterface;
11
use ACP3\Modules\ACP3\System\Installer\Schema;
12
13
class TitleConfigurator
14
{
15
    /**
16
     * @var \ACP3\Core\Settings\SettingsInterface
17
     */
18
    private $settings;
19
20
    public function __construct(SettingsInterface $settings)
21
    {
22
        $this->settings = $settings;
23
    }
24
25
    public function configure(Title $title): void
26
    {
27
        $settings = $this->settings->getSettings(Schema::MODULE_NAME);
28
29
        $title->setSiteTitle($settings['site_title']);
30
        $title->setSiteSubtitle($settings['site_subtitle']);
31
    }
32
}
33