Completed
Push — ezp25376-fields_groups ( 68c1d3 )
by
unknown
32:29
created

SettingsFieldsGroupsList::getDefaultGroup()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * This file is part of the ezpublish-kernel package.
4
 * @license For full copyright and license information view LICENSE file distributed with this source code.
5
 */
6
namespace eZ\Publish\Core\FieldsGroups;
7
8
/**
9
 * A fields groups list implementation based on settings (scalar values) injection.
10
 *
11
 * @internal meant to be instantiated by the DIC. Do not inherit from it or instantiate it manually.
12
 */
13
final class SettingsFieldsGroupsList implements FieldsGroupsList
14
{
15
    /** @var array */
16
    private $groups;
17
18
    /** @var string */
19
    private $defaultGroup;
20
21
    public function __construct($defaultGroup, array $groups)
22
    {
23
        $this->groups = $groups;
24
        $this->defaultGroup = $defaultGroup;
25
    }
26
27
    public function getGroups()
28
    {
29
        return $this->groups;
30
    }
31
32
    public function getDefaultGroup()
33
    {
34
        return $this->defaultGroup;
35
    }
36
}
37